CAS,当oldVal与expected相同时,将oldVal更新为newVal,原子操作ABA problem:when a location is read
twice, has the same value for both reads, and "value is same“ is used...
分类:
其他好文 时间:
2014-05-26 16:06:53
阅读次数:
217
题目: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...
分类:
其他好文 时间:
2014-05-23 12:40:21
阅读次数:
352
The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a litt...
分类:
其他好文 时间:
2014-05-23 02:27:26
阅读次数:
587
判断二维字符串是否满足下面条件:
on both diagonals of the square paper all letters are the same;
all other squares of the paper (they are not on the diagonals) contain the same letter that is different from the...
分类:
其他好文 时间:
2014-05-23 02:21:01
阅读次数:
294
Problem 4: Largest palindrome product
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest pal...
分类:
其他好文 时间:
2014-05-22 18:48:46
阅读次数:
355
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 an...
分类:
其他好文 时间:
2014-05-22 16:46:03
阅读次数:
173
Microsoft Open Technologies has recently
released a Portable Class Libraryfor SQLite. Thanks to it, we can use SQLite in
the same way in all the suppo...
分类:
数据库 时间:
2014-05-22 15:06:51
阅读次数:
428
usingandusing namespacehave validity only in
the same block in which they are stated or in the entire source code file if
they are used directly in th...
分类:
其他好文 时间:
2014-05-22 02:08:48
阅读次数:
268
【题目】
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
The same repeated number may be chosen from C unlimited number of times.
Note:
All numbers (including target) w...
分类:
其他好文 时间:
2014-05-21 15:21:28
阅读次数:
292
戳我去解题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 identic...
分类:
其他好文 时间:
2014-05-20 10:09:37
阅读次数:
201