leetcode - dblank

标签 leetcode 下的文章

leetcode 31-35题解

代码在我的github也有同步31. Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must r...

继续阅读 »

leetcode 26-30题解

代码在我的github也有同步26. Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra sp...

继续阅读 »

leetcode 21-25题解

在我的github同步代码21. Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.题意:合并两个有序数组思路:从两个...

继续阅读 »

leetcode 16-20题解

代码在我的github也有同步16. 3Sum ClosestGiven an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume ...

继续阅读 »

leetcode 11-15题解

代码在我的github同步11. Container With Most WaterGiven n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints ...

继续阅读 »

leetcode 1-5题题解

代码在我的github上也有1.Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and y...

继续阅读 »