码迷,mamicode.com
首页 >  
搜索关键字:union all    ( 25526个结果
Problem Path Sum II
Problem Description:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.Solution: 递归。 1 public List>...
分类:其他好文   时间:2014-07-07 16:59:12    阅读次数:169
Problem Surrounded Regions
Problem Description:Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in th...
分类:其他好文   时间:2014-07-07 16:20:26    阅读次数:216
LeetCode::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-...
分类:其他好文   时间:2014-07-07 16:17:00    阅读次数:139
Problem Palindrome Partitioning
Problem Description:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ...
分类:其他好文   时间:2014-07-07 16:02:55    阅读次数:259
The in operator
The operators we have seen so far are all special characters like + and *, but there are a few operators that are words. in is a boolean operator that...
分类:其他好文   时间:2014-07-07 15:39:31    阅读次数:246
[leetcode] Minimum Window Substring
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
分类:Windows程序   时间:2014-07-07 15:11:15    阅读次数:278
[leetcode] Combinations
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
分类:其他好文   时间:2014-07-07 14:48:39    阅读次数:160
[leetcode] Subsets
Given a set of distinct integers, S, return all possible subsets.
分类:其他好文   时间:2014-07-07 14:31:24    阅读次数:164
POJ1258 Agri-Net MST最小生成树题解
搭建一个最小代价的网络,最原始的最小生成树的应用。 这里使用Union find和Kruskal算法求解. 注意: 1 给出的数据是原始的矩阵图,但是需要转化为边表示的图,方便运用Kruskal,因为需要sort 2 减少边,一个矩阵最多需要(N*N-N)>>1条边,有人讨论本题是否有向,那是无意义的,因为本题的最小生成树和方向无关。 3 使用Union find是为了判断是否有环,比原...
分类:Web程序   时间:2014-06-30 08:10:08    阅读次数:200
N-Queens
题目 The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-que...
分类:其他好文   时间:2014-06-30 00:34:18    阅读次数:188
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!