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 devis...
分类:
其他好文 时间:
2014-07-18 22:33:04
阅读次数:
328
Rubymine快捷键一级必会Ctrl+Alt+R:弹出RakeCtrl+Alt+G:弹出GenerateCtrl+Alt+L:格式化代码Alt+F1:切换视图(Project,Structure,etc.).Alt+F2:弹出预览窗口,可选择浏览器打开网页Alt+Insert:相当于File|Ne...
分类:
其他好文 时间:
2014-07-16 17:01:21
阅读次数:
196
一级必会Shift+F10:运行runningCtrl+Alt+R:弹出RakeCtrl+Alt+G:弹出GenerateCtrl+Alt+L:格式化代码Alt+F1:切换视图(Project, Structure, etc.).Alt+F2:弹出预览窗口,可选择浏览器打开网页Alt+Insert:...
分类:
其他好文 时间:
2014-07-16 15:43:10
阅读次数:
223
In this blog, generic collections will be talked about in details. In the past bacause of shortage of generic argument, less importance has been attached to the this module. Just now after
readin...
分类:
其他好文 时间:
2014-07-15 12:45:00
阅读次数:
253
浑沦吞枣的过了一遍数据结构,今天把最后一章排序的内容结束。大概实现了一个星期看完的想法,当然不是为了求速度,这一次看主要是把各种数据结构做到心中有数,概念清晰,了解各自有哪些经典的算法和算法思路原理。以后若要用到特定的结构和算法再去算法导论中详细研读。下面..
分类:
其他好文 时间:
2014-07-14 12:28:37
阅读次数:
233
BACKGROUNDMany algorithms on a graphics processing unit (GPU) may benefit from doing a query in a hierarchical tree structure (including quad-trees, o...
分类:
其他好文 时间:
2014-07-13 19:47:28
阅读次数:
289
In the Java collection workframe, there are three similar methods, addAll(),retainAll() and removeAll(). addAll(), the retainAll(), and the removeAll()methods are equivalent to the set theoretic unio...
分类:
其他好文 时间:
2014-07-13 16:43:15
阅读次数:
268
天气越来越热,看书还得静得下心啊,今天继续图这一章,概念和算法众多,第一遍看以广度优先的形式为主,以后若要用到具体的算法再去翻“算法导论”吧。下面是学习内容和笔记。图(graph)1.图的存储结构邻接矩阵:顶点数组+边数组(二元);无向图的边数组为对称矩阵,有向图..
分类:
其他好文 时间:
2014-07-13 14:32:18
阅读次数:
214
The Java Connections FrameWork is a group of class or method and interfacs in the java.util package. Its main purpose is to provide a unified framework for implementing common data structure. A collec...
分类:
编程语言 时间:
2014-07-13 13:43:20
阅读次数:
218
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