摘要: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return 贴上一个更加简洁的方法: 阅读全文
posted @ 2018-03-21 21:41 还是说得清点吧 阅读(117) 评论(0) 推荐(0)
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2018-03-21 20:59 还是说得清点吧 阅读(122) 评论(1) 推荐(0)
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, 阅读全文
posted @ 2018-03-21 20:25 还是说得清点吧 阅读(130) 评论(0) 推荐(0)