2016年8月27日

Trapping Rain Water II

摘要: Given n x m non-negative integers representing an elevation map 2d where the area of each cell is 1 x 1, compute how much water it is able to trap aft 阅读全文

posted @ 2016-08-27 16:54 Sheryl Wang 阅读(155) 评论(0) 推荐(0) 编辑

Kth Largest in N Arrays

摘要: Find K-th largest element in N arrays. Example In n=2 arrays [[9,3,2,4,7],[1,2,3,4,8]], the 3rd largest element is 7. In n=2 arrays [[9,3,2,4,8],[1,2, 阅读全文

posted @ 2016-08-27 16:33 Sheryl Wang 阅读(296) 评论(0) 推荐(0) 编辑

Spiral Matrix

摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Given the following matrix: You 阅读全文

posted @ 2016-08-27 16:18 Sheryl Wang 阅读(141) 评论(0) 推荐(0) 编辑

导航