![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
文章平均质量分 63
chenxin_003
这个作者很懒,什么都没留下…
展开
-
LeetCode: Combinations 递归回溯 2种实现方法
题目: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example, If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2,3], [1,2], [1,3],原创 2014-09-12 13:50:04 · 487 阅读 · 0 评论 -
Leetcode Anagrams
题目: Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. 代码如下:原创 2014-09-09 11:39:51 · 322 阅读 · 0 评论 -
Leetcode: Subsets
题目: Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.原创 2014-09-09 16:56:52 · 454 阅读 · 0 评论 -
LeetCode: Linked List Cycle II
题目: Linked List Cycle II : Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Follow up: Can you solve it without using extra space? 代码:原创 2014-08-27 19:45:55 · 332 阅读 · 0 评论 -
Leetcode:Remove Duplicates from Sorted List
题目: Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. 代码如下:原创 2014-09-02 18:51:29 · 398 阅读 · 0 评论 -
Leetcode:subsets2 duplicate number
题目如下: Given a collection of integers that might contain duplicates, S, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set must not co原创 2014-09-09 17:39:24 · 443 阅读 · 0 评论 -
LeetCode:Construct Binary Tree from Preorder and Inorder Traversal
题目: Given preorder and inorder traversal of a tree, construct the binary tree. 代码如下:原创 2014-09-12 20:06:12 · 769 阅读 · 0 评论