Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio...
分类:
其他好文 时间:
2014-11-24 06:27:02
阅读次数:
202
ZigZag ConversionThe string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern...
分类:
其他好文 时间:
2014-11-23 17:30:46
阅读次数:
289
问题描述:
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
基本思路:
与前一篇《Construct Binary Tree from Preord...
分类:
其他好文 时间:
2014-11-23 11:51:28
阅读次数:
172
问题描述:
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
基本思路:
找到规律,递归的解决左子树和右子树。
代码:
/**
* D...
分类:
其他好文 时间:
2014-11-23 10:32:58
阅读次数:
190
//----------------使用了innerHTML标签完成了对属性内容的引用和更改easyCalendar Calendar January February March April May June July August September October N...
分类:
其他好文 时间:
2014-11-22 11:56:46
阅读次数:
139
合并两个有序数组,放在A中,A中的空间足够。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 th...
分类:
其他好文 时间:
2014-11-22 01:56:43
阅读次数:
209
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2014-11-21 20:23:44
阅读次数:
118
By admin on May 29, 2011 ? ? I have been working on clustering code improvements in the Tigase server for last a few months to make it more reliable and better scale. In article about XMPP Servic...
分类:
Web程序 时间:
2014-11-21 12:49:18
阅读次数:
272
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:
其他好文 时间:
2014-11-21 12:15:28
阅读次数:
149
Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may ...
分类:
其他好文 时间:
2014-11-20 20:11:18
阅读次数:
177