![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
代码练习
Basaly
产品经理
展开
-
Remove Element
题目: Given an array and a value, remove all instances of that > value in place and return the new length. The order of elements can be changed. It doesn't matter what you leave beyond the new length.原创 2017-03-29 23:58:24 · 346 阅读 · 0 评论 -
Remove Duplicates from Sorted Array
题目: Given a sorted array, remove the duplicates in place such that > each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in plac原创 2017-03-30 00:39:27 · 193 阅读 · 0 评论 -
Pascal's Triangle
题目:Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ] 要得到一个帕斯卡三角,我们只需要找到规律即可。 第k层有k个元素 每层原创 2017-03-31 23:10:54 · 159 阅读 · 0 评论 -
Merge Sorted Array
题目: Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements fr原创 2017-03-31 23:32:04 · 243 阅读 · 0 评论