Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-09-05 12:53:01
阅读次数:
260
问题描述:反转整数,例子:输入:x = 123, return 321; x = -123, return -321方法:class Solution {public: int reverse(int x) { int newX = 0; int sign = 1;...
分类:
其他好文 时间:
2014-09-05 10:00:51
阅读次数:
174
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-09-05 05:31:40
阅读次数:
176
#虚拟网络拓扑的json数据 def topodata #@vnic = Vnic.all #flash.now[:notice] = 'Message sent!' #flash.now[:alert] = 'Message sent!' simple_json = { nodes:...
分类:
Web程序 时间:
2014-09-04 16:42:29
阅读次数:
299
也是面腾讯的一道编程题=,= 这题比较简单代码如下: 1 #include 2 #include 3 4 // 非递归实现字符串反转 5 char *reverse_v1(char *str) 6 { 7 if( !str ) 8 { 9 ...
分类:
编程语言 时间:
2014-09-04 16:29:09
阅读次数:
153
#虚拟网络拓扑json数据 def topodata #@vnic = Vnic.all #flash.now[:notice] = 'Message sent!' #flash.now[:alert] = 'Message sent!' @vnic = { nodes: [{ name...
分类:
Web程序 时间:
2014-09-04 01:32:07
阅读次数:
240
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 e...
分类:
其他好文 时间:
2014-09-03 21:13:57
阅读次数:
142
问题描述
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Recur...
分类:
其他好文 时间:
2014-09-02 21:23:55
阅读次数:
317
问题描述
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add
the two numbers...
分类:
其他好文 时间:
2014-09-02 19:57:55
阅读次数:
166
问题描述
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
Note: Recurs...
分类:
其他好文 时间:
2014-09-02 17:50:45
阅读次数:
136