码迷,mamicode.com
首页 >  
搜索关键字:the unique mst    ( 5979个结果
LeetCode 040 Combination Sum II
题目要求:Combination Sum IIGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate number...
分类:其他好文   时间:2015-02-07 20:18:42    阅读次数:122
LeetCode 039 Combination Sum
题目要求:Combination SumGiven a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT...
分类:其他好文   时间:2015-02-07 20:15:34    阅读次数:132
LeetCode-3SUM(数组中三数之和为0)
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 sum of zero. Note: Elements in a triplet (a,b,c...
分类:编程语言   时间:2015-02-07 17:34:00    阅读次数:203
LeetCode 018 4Sum
题目描述:4SumGiven an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives th...
分类:其他好文   时间:2015-02-07 17:09:55    阅读次数:129
LeetCode 015 3Sum
题目描述:3SumGiven an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.No...
分类:其他好文   时间:2015-02-07 15:51:56    阅读次数:96
Unique Binary Search Tree II
这道题和上一道的思路一样,只是在BST的处理上注意下,包括二叉树的复制,二叉树的调整。 1 vector b; 2 class Solution { 3 public: 4 TreeNode* CopyTree(TreeNode* t) 5 { 6 TreeNode*...
分类:其他好文   时间:2015-02-07 00:22:44    阅读次数:246
UVa 11572 (滑动窗口) Unique Snowflakes
滑动窗口挺有意思的,如果符合条件右端点一直向前走,不符合的话,左端点向前走。 1 #include 2 using namespace std; 3 4 set Set; 5 6 const int maxn = 1000000 + 10; 7 int a[maxn]; 8 9 int Sc...
分类:其他好文   时间:2015-02-06 23:10:45    阅读次数:191
poj 2054 Color a Tree 据说是贪心
Bob is very interested in the data structure of a tree. A tree is a directed graph in which a special node is singled out, called the "root" of the tree, and there is a unique path from the root to each of the other nodes. Bob intends to color all the no...
分类:其他好文   时间:2015-02-06 21:55:57    阅读次数:221
LeetCode --- 40. Combination Sum II
题目链接:Combination Sum II Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be use...
分类:其他好文   时间:2015-02-06 21:48:23    阅读次数:290
LeetCode --- 39. Combination Sum
题目链接:Combination Sum Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen fro...
分类:其他好文   时间:2015-02-06 21:47:21    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!