题目
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,3,2].
Note: Recur...
分类:
其他好文 时间:
2014-06-20 10:22:00
阅读次数:
221
【题目】
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ 9 20
/ 15 7
return its b...
分类:
其他好文 时间:
2014-06-20 09:42:30
阅读次数:
224
python实现的链表,包括插入、查找、删除操作
#!/usr/bin/python
class linknode():
def __init__(self,k,n=None):
self.key=k;
self.next=n;
def createlist(): #创建链表
n=raw_input("enter the num of nodes");
n=int(...
分类:
编程语言 时间:
2014-06-07 12:23:46
阅读次数:
204
这个题比较简单,考虑特殊情况如12000,注意检查反转后数字是否会越界溢出。...
分类:
其他好文 时间:
2014-06-07 12:01:08
阅读次数:
258
Powerdesigner 从数据库导入数据 第一步, 打开 powerdesigner, 在菜单选择
【File】 选项, 然后在弹出的下拉单中选择 【Reverse
Engineer】选项,再选择【Database】选项第二步可以选择【Usingadatasource】选项右边的按钮第三步弹出【...
分类:
数据库 时间:
2014-06-07 09:50:33
阅读次数:
230
Partition ListGiven a linked list and a valuex,
partition it such that all nodes less thanxcome before nodes greater than or
equal tox.You should pres...
分类:
其他好文 时间:
2014-06-07 06:24:57
阅读次数:
179
Given a sorted linked list, delete all nodes
that have duplicate numbers, leaving onlydistinctnumbers from the original
list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-06-06 06:57:18
阅读次数:
271
Given a linked list, reverse the nodes of a
linked list k at a time and return its modified list. If the number of nodes is
not a multiple of k then l...
分类:
其他好文 时间:
2014-06-05 22:13:19
阅读次数:
391
Given a binary tree, find its maximum depth.The
maximum depth is the number of nodes along the longest path from the root node
down to the farthest le...
分类:
其他好文 时间:
2014-06-05 14:10:38
阅读次数:
304
Given a linked list, swap every two adjacent
nodes and return its head.For example,Given1->2->3->4, you should
return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-06-05 13:41:44
阅读次数:
231