1. 指针和地址TCPL 中给指针的定义是: A pointer is a group of
cells (often two or four) that can hold an address .int value = 10;int *pvalue =
&value;上面这个语句的内存模型是:注意...
分类:
其他好文 时间:
2014-06-02 18:07:49
阅读次数:
315
问题描述:
Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).
If d(a) = b and d(b) = a, where a b, then a and b are
an amicable pair and each ...
分类:
编程语言 时间:
2014-06-02 12:31:42
阅读次数:
298
【题目】
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
【题意】
判断了两个二叉树是否相等
【思路】
递归...
分类:
其他好文 时间:
2014-06-02 11:03:03
阅读次数:
205
【题目】
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 is pretty straight forward. Could you devise a constant space solution?
confused what "{1,#,2,3}" ...
分类:
其他好文 时间:
2014-06-02 10:38:17
阅读次数:
246
Subsets
Total Accepted: 13267 Total
Submissions: 48509My Submissions
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-desc...
分类:
其他好文 时间:
2014-06-02 10:28:35
阅读次数:
186
DescriptionThe police office in Tadu City
decides to say ends to the chaos, as launch actions to root up the TWO gangs in
the city, Gang Dragon and Ga...
分类:
其他好文 时间:
2014-06-02 09:38:19
阅读次数:
219
ParencodingsDescriptionLet S = s1 s2...s2n be a
well-formed string of parentheses. S can be encoded in two different ways: q By
an integer sequence P ...
分类:
其他好文 时间:
2014-06-02 06:19:50
阅读次数:
185
Batteries included: RabbitMQ clustering The
clustering built in to RabbitMQ was designed with two goals in mind: allowing
consumers and producers to k...
分类:
其他好文 时间:
2014-06-02 06:11:46
阅读次数:
392
归并排序是建立在归并操作上的一种有效的排序算法。该算法是采用分治法(Divide and
Conquer)的一个非常典型的应用。 归并操作(merge),也叫归并算法,指的是将两个已经排序的序列合并成一个序列的操作。归并排序算法依赖归并操作。
归并操作步骤如下:(两个有序序列分别用A[aMax]、B...
分类:
其他好文 时间:
2014-06-02 01:19:11
阅读次数:
349
3-sum
题目描述:
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.
题目要求:
Elements...
分类:
其他好文 时间:
2014-06-01 17:31:27
阅读次数:
471