【026-Remove Duplicates from Sorted Array(删除排序数组中的重复元素)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given a sorted array, remove the duplicates in place such that each element appear only once and return the...
分类:
编程语言 时间:
2015-07-24 08:06:09
阅读次数:
191
【021-Merge Two Sorted Lists(合并两个排好序的单链表)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of t...
分类:
编程语言 时间:
2015-07-23 08:16:37
阅读次数:
164
【022-Generate Parentheses(生成括号)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3...
分类:
编程语言 时间:
2015-07-23 08:15:55
阅读次数:
137
【023-Merge k Sorted Lists(合并k个排好的的单链表)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
题目大意 合并k个排好的的单链表。分析和描述它...
分类:
编程语言 时间:
2015-07-23 08:15:33
阅读次数:
181
【019-Remove Nth Node From End of List(移除单链表的倒数第N个节点)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given a linked list, remove the nth node from the end of list and return its head.
For example, Given lin...
分类:
编程语言 时间:
2015-07-22 09:30:15
阅读次数:
132
【020-Valid Parentheses(括号验证)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.
The brackets...
分类:
编程语言 时间:
2015-07-22 09:30:07
阅读次数:
141
【018-4Sum(四个数的和)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array...
分类:
编程语言 时间:
2015-07-22 09:28:28
阅读次数:
147
【017-Letter Combinations of a Phone Number (电话号码上的单词组合)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given a digit string, return all possible letter combinations that the number could represent.
A mapping...
分类:
编程语言 时间:
2015-07-21 09:11:42
阅读次数:
133
【016-3 Sum Closest(最接近的三个数的和)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given 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 th...
分类:
编程语言 时间:
2015-07-21 09:10:14
阅读次数:
151
【013-3 Sum(三个数的和)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the su...
分类:
编程语言 时间:
2015-07-21 09:10:13
阅读次数:
181