码迷,mamicode.com
首页 >  
搜索关键字:permutations ii    ( 7008个结果
Python 点滴 II
【__doc__】 >>> str.__doc__ #内置文档字符串; 模块级 "str(object='') -> string\n\nReturn a nice string representation of the object.\nIf the argument is a string, the return value is the same object." >>> str.upper.__doc__ #内置文档字符串; 函数级 'S.upper() -> string\n...
分类:编程语言   时间:2014-10-29 14:58:23    阅读次数:307
leetcode Permutations
题目:Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1],...
分类:其他好文   时间:2014-10-29 01:57:39    阅读次数:189
leetcode Permutations II
题目:和上一题一样,就是这时候给定的数字可能有重复。做法:只要将num排好序,然后判断如果当前的值等于前一个的话,那么就跳过,就不会有重复的人。果然是AC了。 1 class Solution { 2 public: 3 vector > permuteUnique(vector &num)...
分类:其他好文   时间:2014-10-29 01:55:09    阅读次数:154
hdu 4513 吉哥系列故事——完美队形II
吉哥系列故事——完美队形IITime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1075Accepted Submission(s): 388Probl...
分类:其他好文   时间:2014-10-29 01:38:29    阅读次数:179
[leetcode]Binary Tree Level Order Traversal II
问题描述: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For example: Given binary tree {3,9,20,#,#,...
分类:其他好文   时间:2014-10-27 21:21:00    阅读次数:190
[leetcode]Path Sum II
问题描述: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree and sum = 22, 5 /...
分类:其他好文   时间:2014-10-26 14:24:00    阅读次数:224
[leetcode]Pascal's Triangle II
问题描述: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorithm to use only O(k) extra space? 思路: ...
分类:其他好文   时间:2014-10-26 11:46:08    阅读次数:251
Binary Tree Level Order Traversal II 二叉树层序遍历之二
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:其他好文   时间:2014-10-26 06:47:17    阅读次数:187
leetcode第39题--Combination Sum II
题目:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each numb...
分类:其他好文   时间:2014-10-26 06:43:06    阅读次数:171
c++冒泡排序法
//冒泡排序法#includeusing namespace std;int main (){ int i,j,t,ii; int a[11]; //第0个元素始终没有用 cout>a[i]; //输入a[1]~a[10] } cout<<e...
分类:编程语言   时间:2014-10-25 19:58:03    阅读次数:284
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!