Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].用递归...
分类:
其他好文 时间:
2015-02-27 16:40:51
阅读次数:
99
https://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/Given a binary tree, return thebottom-up level ordertraversal of its nodes' valu...
分类:
其他好文 时间:
2015-02-27 14:53:37
阅读次数:
133
https://oj.leetcode.com/problems/binary-tree-level-order-traversal/Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from...
分类:
其他好文 时间:
2015-02-27 14:49:54
阅读次数:
178
Binary String Matching时间限制:3000ms | 内存限制:65535KB难度:3描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell ho...
分类:
其他好文 时间:
2015-02-27 13:24:23
阅读次数:
141
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes w...
分类:
其他好文 时间:
2015-02-26 21:32:47
阅读次数:
191
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-02-26 21:32:39
阅读次数:
152
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.解法:自底向上 时间复杂度O(n), 空间复杂度O(logN) 1 clas...
分类:
其他好文 时间:
2015-02-26 19:58:04
阅读次数:
166
终于进入了中等难度的题目了。貌似leetcode不停地加题量,要做完正的是不那么容易啊。新年开工,小伙伴们都在晒红包,深圳这边 上班第一天一般都有发红包,不知道其他地方的是不是也这样。
到目前为止,做了40题了,不得不感慨,算法有待提高。大学真是白过了,人生那么美好的四年白过了,这是多么的悲哀。 现在想想,一个人要想在大学过得有意义,对以后的人生打下坚实的基础,那么最迟在大学一年之后,一定要...
分类:
其他好文 时间:
2015-02-26 18:37:33
阅读次数:
121
由于项目需要,服务器上要安装php和imagick库的支持,网上搜了下,教程很多,基本类似,IIS7配置PHP就不说了,现在有PHP Manager,用fastcgi模式配置起来很方便
1、先安装 ImageMagick-6.8.7-7-Q16-x64-dll.exe 。
下载地址:http://www.imagemagick.org/script/binary-rele...
分类:
Web程序 时间:
2015-02-26 18:36:19
阅读次数:
445
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any...
分类:
其他好文 时间:
2015-02-26 18:32:25
阅读次数:
168