Subsets IIGiven a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descend...
分类:
其他好文 时间:
2014-07-26 01:40:06
阅读次数:
178
SubsetsGiven 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...
分类:
其他好文 时间:
2014-07-26 01:34:56
阅读次数:
189
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-07-26 00:23:26
阅读次数:
242
Merge Sorted ArrayGiven two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that i...
分类:
其他好文 时间:
2014-07-25 02:34:44
阅读次数:
162
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:
其他好文 时间:
2014-07-24 21:24:16
阅读次数:
296
#用到了贪心方法。
#这个贪心刚开始想错了方法,后来想到了新的方法,AC
#include
#include
#include
#include
using namespace std;
struct note
{
int x1,x2,y1,y2,x,y;
int num;
} a[5010];
int vis[5010];
bool cmp1(note aa,note...
分类:
其他好文 时间:
2014-07-24 12:26:15
阅读次数:
185
题目比较简单。注意看测试用例2,给的提示Please note that this is the largest possible return value: whenever there is a solution, there is a solution that uses at most tw...
分类:
其他好文 时间:
2014-07-23 14:46:06
阅读次数:
283
Cocos2d-xWin32中使用VisualLeakDetector(forVC++)检查内存泄漏NOTE:本文引自我于2012-11写于ITPUB上的一篇小文,添加于此主要目前是为方便新开课程《基于CocoStudio开发跨平台拇指空当接龙游戏》学员们参考之用。VisualLeak
Detector(vld,下载地址http://vld.codeplex.com/..
分类:
编程语言 时间:
2014-07-23 13:48:37
阅读次数:
296
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.题解:所谓的anagrams,只若干个词,它们包含的字母的个数和种类完全一...
分类:
其他好文 时间:
2014-07-23 12:55:06
阅读次数:
167
题目
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it wit...
分类:
其他好文 时间:
2014-07-23 00:13:17
阅读次数:
331