Given a 2D array with rows sorted in ascending order. Find the median of the whole 2D array. For example, A= 2, 4, 5, 6 1, 2, 2 ,4 3, 4, 4, 5 1, 2 , 3, 3 Then the merged array would be [1, 1, 2, 2 ,2, 2, 3, 3, 3, 4, 4, […]
Tag Archives: matrix
Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside of the boundary (i.e. wrap-around is not allowed). Example 1: nums = [ [9,9,4], [6,6,8], [2,1,1] ] Return 4 The […]