
练习java基础
tester_nie
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Remove Duplicates from Sorted Array (java版)
Given a sorted array, remove the duplicates in place such that each element appear onlyonce and return the new length.Do not allocate extra space for another array, you must do this in place with翻译 2017-04-06 22:40:31 · 318 阅读 · 1 评论 -
Remove Element (java版)
Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with constant memory.The翻译 2017-04-06 21:39:20 · 672 阅读 · 0 评论 -
Remove Duplicates from Sorted Array II(java版)
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array nums = [1,1,1,2,2,3],Your function should return length = 5, with the first five e翻译 2017-04-16 13:37:48 · 180 阅读 · 0 评论 -
Pascal's Triangle(java版)
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]]帕斯卡三角找规律1、第k层有k个元素2、每层第一翻译 2017-04-16 14:25:56 · 305 阅读 · 0 评论 -
Pascal's Triangle II
Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?Subscribe to see翻译 2017-04-16 20:12:23 · 219 阅读 · 1 评论 -
Merge Sorted Array
Given two sorted integer arrays nums1 and nums2, merge nums2 intonums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is greater or equal tom + n) to hold addit翻译 2017-06-04 13:20:26 · 181 阅读 · 0 评论