摘要:
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2... 阅读全文
摘要:
A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文
摘要:
Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.... 阅读全文
摘要:
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number... 阅读全文
摘要:
首先声明,都是转载的,理解知识为主要目的。http://www.cnblogs.com/zahxz/archive/2013/02/20/2918711.htmlC++内置的数组支持容器的机制,但是它不支持容器抽象的语义。要解决此问题我们自己实现这样的类。在标准C++中,用容器向量(vector)实... 阅读全文
摘要:
Given 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 is greater or equal... 阅读全文
摘要:
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation... 阅读全文
摘要:
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi... 阅读全文
摘要:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-... 阅读全文
摘要:
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu... 阅读全文