10.1 GET请求10.2 XML解析10.3 JSON解析10.4 POST请求10.1 GET请求通过一个第三方提供的云服务,查询IP归属地:http://www.youdao.com/smartresult-xml/search.s?type=ip&q=218.241.121.186它的返回...
分类:
移动开发 时间:
2014-07-14 09:13:51
阅读次数:
372
Implement a function to check if a binary tree is a binary search tree./* The inorder travel of a BST is strictly increasing. We track the pre node of...
分类:
其他好文 时间:
2014-07-13 22:27:09
阅读次数:
344
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Recursive solut...
分类:
其他好文 时间:
2014-07-13 17:18:19
阅读次数:
193
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:...
分类:
其他好文 时间:
2014-07-13 17:13:49
阅读次数:
213
Given a binary tree, determine if it is a valid binary search tree (BST).
Assume a BST is defined as follows:
The left subtree of a node contains only nodes with keys less than the node's key.Th...
分类:
其他好文 时间:
2014-07-13 16:53:01
阅读次数:
189
Layout 是 D3 中 “制作常见图形的函数”,用 Layout 可以轻松地对输入数据进行转换,使得它能容易地适应可视化图形使用的需要。...
分类:
Web程序 时间:
2014-07-13 16:30:01
阅读次数:
294
提交地址:点击打开链接
题意: N(N
分析:涉及集合的查询,合并,取最值。 利用并查集和左偏树即可解决。
#include
#include
#include
#include
using namespace std;
const int maxn = 200000;
int tot, v[maxn], l[maxn], r[maxn], d[maxn], f[...
分类:
其他好文 时间:
2014-07-13 15:38:55
阅读次数:
183
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum
...
分类:
其他好文 时间:
2014-07-13 13:58:01
阅读次数:
184
Design an algorithm and write code to find the first common ancestory of two nodes in a binary tree. Avoid storing additional nodes in data structure....
分类:
其他好文 时间:
2014-07-13 13:24:21
阅读次数:
279
数组是升序的,数组经过循环移动之后,肯定是有左半部分或者有半部分还是升序的。
代码:
public class SearchRotateArray {
public static int search(int a[], int l, int u, int x) {
while(l<=u){
int m = (l+u)/2;
if(x==a[m]){
return m;...
分类:
移动开发 时间:
2014-07-12 23:11:02
阅读次数:
271