Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it to ...
分类:
其他好文 时间:
2014-09-20 10:07:27
阅读次数:
162
Evaluate Reverse Polish NotationTotal Accepted:24595Total Submissions:123794My SubmissionsEvaluate the value of an arithmetic expression inReverse Pol...
分类:
其他好文 时间:
2014-09-20 01:07:16
阅读次数:
213
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: Recursive solut...
分类:
其他好文 时间:
2014-09-19 17:42:05
阅读次数:
158
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: Recursive soluti...
分类:
其他好文 时间:
2014-09-19 17:40:15
阅读次数:
177
刚接触python不久,被python的简洁强大迷倒了,在做leetcode,Reverse words in a string时,刚开始还是传统的思路想着怎么处理空格问题一直测试不通过,写的很罗嗦被师弟吐槽说你写的代码好丑,好心塞。 废话不多说直接奉上思路代码: 翻转字符串如:"Hello...
分类:
编程语言 时间:
2014-09-19 15:32:35
阅读次数:
275
题目:
Reverse digits of an integer.
Have you thought about this?
Here are some good questions to ask before coding. Bonus points for you if you have already thought through this!
If the inte...
分类:
其他好文 时间:
2014-09-18 18:52:54
阅读次数:
191
估计80%以上接触互联网的人都知道bt是什么东西,任何一个用bt下载的人都知道这样一个概念,种子。bt种子就是记录了p2p对等网络中tracker, nodes, files等信息,也就是说,这个种子告诉你,你要下载什么,到哪里下载。bt种子文件有自己的文件格式,下面简单看看bt种子文件的结构。.....
分类:
其他好文 时间:
2014-09-18 18:41:44
阅读次数:
180
目录OutputCache概念学习OutputCache属性详解(一)OutputCache属性详解一LocationWeb应用程序中的使用缓存位置:客户端缓存(Client Caching)代理缓存(Proxy Caching)反向代理缓存(Reverse Proxy Caching)服务器缓存(...
分类:
其他好文 时间:
2014-09-18 18:13:04
阅读次数:
180
题目:
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 and the nodes have the same value.
刷题打卡中...
分类:
其他好文 时间:
2014-09-18 16:33:24
阅读次数:
205
Problem DescriptionYou are given a tree with N nodes which are numbered by integers 1..N. Each node is associated with an integer as the weight.Your t...
分类:
其他好文 时间:
2014-09-18 16:03:14
阅读次数:
325