原题链接:http://oj.leetcode.com/problems/partition-list/这是一道链表操作的题目,要求把小于x的元素按顺序放到链表前面。我们仍然是使用链表最经常使用的双指针大法,一个指向当前小于x的最后一个元素,一个进行往前扫描。假设元素大于x,那么继续前进,否则,要把...
分类:
其他好文 时间:
2015-06-03 11:32:07
阅读次数:
141
https://leetcode.com/problems/roman-to-integer/原题:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to...
分类:
其他好文 时间:
2015-06-03 00:43:07
阅读次数:
181
题目在这里:https://leetcode.com/problems/trapping-rain-water/[标签] Array; Stack; Two Pointers这个题我感觉很难,我自己是完全不会。下面贴的是别人想到的好方法,自己适当做了些简单调整。我觉得,这个解法非常巧妙的使用了双向的...
分类:
移动开发 时间:
2015-06-02 09:15:32
阅读次数:
149
Binary Tree Preorder Traversal:https://leetcode.com/problems/binary-tree-preorder-traversal/
Binary Tree Inorder Traversal :https://leetcode.com/problems/binary-tree-inorder-traversal/
Binary Tree Po...
分类:
其他好文 时间:
2015-06-01 22:45:30
阅读次数:
137
Rotate List :https://leetcode.com/problems/rotate-list/问题描述Given a list, rotate the list to the right by k places, where k is non-negative.For example:
Given 1->2->3->4->5->NULL and k = 2,
return 4->...
分类:
其他好文 时间:
2015-06-01 11:34:49
阅读次数:
88
Permutation Sequence : https://leetcode.com/problems/permutation-sequence/问题描述:The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,...
分类:
其他好文 时间:
2015-05-30 16:44:50
阅读次数:
122
转http://www.iteye.com/problems/69457 Activity启动后点击一个界面按钮后会开启一个服务(暂定为padService),在padService中会启动一个线程(暂定为Thread-3)发起Socket连接。我们项目中使用mina作为socket通信框架,用过m...
分类:
编程语言 时间:
2015-05-29 19:46:44
阅读次数:
131
问题Next Permutation:https://leetcode.com/problems/next-permutation/Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement...
分类:
其他好文 时间:
2015-05-29 18:18:23
阅读次数:
118
Description
Download as PDFA couple of years ago, a new world wide crisis started, leaving many people with economical problems. Some workers of a particular company are trying to ask for an increase...
分类:
其他好文 时间:
2015-05-29 10:08:53
阅读次数:
122