题目:Two elements of a binary search tree (BST) are
swapped by mistake.Recover the tree without changing its structure.Note:A
solution using O(n) space ...
分类:
其他好文 时间:
2014-05-23 11:31:51
阅读次数:
299
题目:
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 implem...
分类:
其他好文 时间:
2014-05-20 16:22:52
阅读次数:
241
http://note.youdao.com/share/?id=0f3b39a6c3e0d5363076729662d164a3&type=note一、简单网络管理协议(SNMP,Simple
Network Management Protocol)构成了互联网工程工作小组(IETF,Intern...
分类:
移动开发 时间:
2014-05-20 10:49:00
阅读次数:
363
Construct Binary Tree from Preorder and Inorder
TraversalGiven preorder and inorder traversal of a tree, construct the binary
tree.Note:You may assume...
分类:
其他好文 时间:
2014-05-19 18:43:40
阅读次数:
177
题目链接Given two numbers represented as strings,
return multiplication of the numbers as a string.Note: The numbers can be
arbitrarily large and are non-...
分类:
其他好文 时间:
2014-05-19 14:10:25
阅读次数:
250
【题目】
Given a linked list, remove the nth node from the end of list and return its head.
For example,
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the linked list becomes 1->2->3->5.
Note:
Given n will ...
分类:
其他好文 时间:
2014-05-18 18:48:03
阅读次数:
269
【题目】
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.
Note:
Elements in a quadruplet (a,b,c,d) must be in non-descending ord...
分类:
其他好文 时间:
2014-05-18 08:46:04
阅读次数:
227
var db:NotesDatabase=session.getCurrentDatabase();
var doc:NotesDocument=db.getDocumentByUNID('80E2193C517E9B3A872578D90018D92E');
var valString:String = "";
if (doc.hasItem('BWImage')){
var nrt:Note...
分类:
其他好文 时间:
2014-05-18 06:26:33
阅读次数:
267
【题目】
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) must be in non-descending order. (ie, a ≤ b ≤ c)
The so...
分类:
其他好文 时间:
2014-05-18 03:15:50
阅读次数:
287
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-05-18 01:25:07
阅读次数:
288