![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
abs.征召
这个作者很懒,什么都没留下…
展开
-
leetcode_1_TwoSum
//给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 // // 你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。 // // 示例: // // 给定 nums = [2, 7, 11, 15], target = 9 // //因为 nums[0] + nums[1] = 2 + ...原创 2019-10-29 22:48:01 · 125 阅读 · 0 评论 -
leetcode_283_MoveZeroes
//给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 // // 示例: // // 输入: [0,1,0,3,12] //输出: [1,3,12,0,0] // // 说明: // // // 必须在原数组上操作,不能拷贝额外的数组。 // 尽量减少操作次数。 class Solution03 { //思考: 这个...原创 2019-10-27 23:08:27 · 85 阅读 · 0 评论