- 博客(6)
- 资源 (33)
- 收藏
- 关注
原创 leetcode86. Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of the nodes in each of
2016-02-26 15:19:57 373
原创 leetcode82. Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2->3->3->4->4->5, return 1->2->5.Given 1->1-
2016-02-26 14:51:32 333
原创 leetcode80 Remove Duplicates from Sorted Array II
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array nums = [1,1,1,2,2,3],Your function should return length = 5, with the first fi
2016-02-26 11:04:12 326
原创 leetcode77 Combinations
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], [1,4],]
2016-02-26 10:27:49 312
原创 leetcode328. Odd Even Linked List
Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.You should try to do it in
2016-02-25 10:10:38 397
原创 AVL搜索树相关源代码
AVL树又被称为平衡二叉树#include#include#include#includeusing namespace std;typedef struct AVLTree{ int nData; struct AVLTree *pLeft; struct AVLTree *pRight; int nHeight;}AVLTree;int Max(int a, int
2016-02-09 14:59:09 332
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人