Min Cost to Repair Edges (Minimum Spanning Tree II)
AmazonOnline AssessmentMSTGraph
Rose Garden
GoogleOnline Assessment
Minimum Number Of Decreasing Subsequence Partitions
GoogleOnline AssessmentHardDP
Cut Binary Search Tree
AmazonTreeBSTHardLC
Subtree: Maximum Average Node
AmazonOnline AssessmentMediumTree
Fill 2D Array
GoogleOnline Assessment
Rearrange String
String
Pickup Coupon
GoogleOnline Assessment
Tree Diameter
Google
Top N Buzzwords
AmazonOnline AssessmentHOT
Load Balancer
AmazonOnline Assessment
Find Substrings
AmazonOnline AssessmentHard
Partition String
AmazonOnline AssessmentStringMedium
Max Sink Area
Given an M * N matrix, where matrix[i][j] is the height of the block on position (i, j). Each block has 4 neighbors - the blocks at its top, bottom, left and right.
A sink area is a group of neighboring blocks that are fully surrounded by other blocks with greater heights. When water is poured onto the matrix, the sink area traps the water in it. Build a function that finds the number of blocks in the maximum sink area...