
leetcode
歪歪の
这个作者很懒,什么都没留下…
展开
-
leetcode解题之 16. 3Sum Closest Java版
16. 3Sum ClosestGiven an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that ...原创 2019-01-03 19:35:53 · 256 阅读 · 0 评论 -
leetcode解题之 27. Remove Element Java版
27. Remove ElementGiven an array nums and a value val, 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 by modify...原创 2019-01-04 23:55:35 · 242 阅读 · 0 评论 -
leetcode解题之 26. Remove Duplicates from Sorted Array Java版
Remove Duplicates from Sorted ArrayGiven a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for anoth...原创 2019-01-04 23:37:13 · 252 阅读 · 0 评论 -
leetcode解题之 18. 4Sum Java版
4SumGiven an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum o...原创 2019-01-04 23:21:06 · 156 阅读 · 0 评论 -
leetcode解题之 15. 3Sum Java版
3SumGiven an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set must not c...原创 2019-01-02 22:18:26 · 108 阅读 · 0 评论 -
LeetCode 11 Container With Most Water(最大水容器)
标题SummaryWe have to maximize the Area that can be formed between the vertical lines using the shorter line as length and the distance between the lines as the width of the rectangle forming the area....原创 2019-01-01 20:45:49 · 135 阅读 · 0 评论 -
JAVA实现跳台阶问题(《剑指offer》)
题目描述一只青蛙一次可以跳上1级台阶,也可以跳上2级。求该青蛙跳上一个n级的台阶总共有多少种跳法(先后次序不同算不同的结果)。原创 2018-11-27 21:42:13 · 287 阅读 · 0 评论