以下为代码实现function heapsort( array ){ bulidHeap( array ); for( var i = array.length-1; i >= 0; --i ){ swap( array, 0, i ); adjust( ar...
分类:
编程语言 时间:
2014-12-27 21:41:55
阅读次数:
230
点击左边下面的“我的证书”,然后点击右边的证书,打开下面有一个key导出就可以了。
转pem
openssl pkcs12 -in Name.p12 -out Name.pem -nodes...
分类:
其他好文 时间:
2014-12-27 17:39:42
阅读次数:
119
【题目】
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 nod...
分类:
其他好文 时间:
2014-12-27 17:34:02
阅读次数:
236
Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the or...
分类:
其他好文 时间:
2014-12-27 11:22:42
阅读次数:
176
Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the or...
分类:
其他好文 时间:
2014-12-27 11:16:12
阅读次数:
161
Given an directed graph, a topological order of the graph nodes is defined as follow:For each directed edge A-->B in graph, A must before B in the ord...
分类:
其他好文 时间:
2014-12-27 00:15:16
阅读次数:
330
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
Given binary tr...
分类:
其他好文 时间:
2014-12-26 16:46:08
阅读次数:
159
题目:Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2-...
分类:
编程语言 时间:
2014-12-26 16:19:58
阅读次数:
157
引言在我的上一篇博客中,讲述了swap函数。原本swap只是STL的一部分,而后成为异常安全性编程的脊柱,以及用来处理自我赋值可能性。一、swap函数标准库的swap函数如下:1 namespace std {2 template3 void swap(T &a, T& b)4 ...
分类:
编程语言 时间:
2014-12-26 16:10:26
阅读次数:
435
题目:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.代码:oj在...
分类:
编程语言 时间:
2014-12-26 16:08:31
阅读次数:
205