摘要: Given an array of integers, find a contiguous subarray which has the largest sum. Given the array [−2,2,−3,4,−1,2,1,−5,3], the contiguous subarray[4,− 阅读全文
posted @ 2016-02-27 08:21 哥布林工程师 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2016-02-27 08:07 哥布林工程师 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in ZigZag-order. Given a matrix: [ [1, 2, 3, 4], [5, 6, 7, 8], 阅读全文
posted @ 2016-02-27 07:53 哥布林工程师 阅读(193) 评论(0) 推荐(0) 编辑