public class Solution { public ListNode removeNthFromEnd(ListNode head, int n) { ListNode firstTraveling = head; ListNode lastTraveli...
分类:
其他好文 时间:
2014-09-11 23:39:32
阅读次数:
195
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321 1 public class Solution { 2 public int reverse(int x) { 3 ...
分类:
其他好文 时间:
2014-09-11 20:48:02
阅读次数:
223
Encounted such error in VS after I update the xamarin at Mac side.Here is the solution for u to reference: Open VS ->Tools->Options->Xamarin->IOS Sett...
分类:
移动开发 时间:
2014-09-11 15:08:52
阅读次数:
320
public class Solution { public int maxSubArray(int[] A) { return totalMax(A, 0, A.length-1); } public int totalMax(in...
分类:
其他好文 时间:
2014-09-11 05:34:11
阅读次数:
154
class Solution {private: const char sep_char = '\1';public: string longestPalindrome(string s) { int max_len = 0; int len = s....
分类:
其他好文 时间:
2014-09-11 01:06:51
阅读次数:
265
//递归结发,计算正确,但是会timeout 1 public class Solution { 2 public List> combine(int n, int k) { 3 int [] num = new int[n+1]; 4 for (int i=...
分类:
其他好文 时间:
2014-09-10 22:24:51
阅读次数:
156
1 public class Solution { 2 public void connect(TreeLinkNode root) { 3 TreeLinkNode upperTravelingNode = root; 4 if (root==null) ...
分类:
其他好文 时间:
2014-09-10 21:06:51
阅读次数:
196
1 public class Solution { 2 public List getRow(int rowIndex) { 3 List result = new ArrayList(); 4 for (int i=0; i=0; j--) { 6 ...
分类:
其他好文 时间:
2014-09-10 21:02:51
阅读次数:
180
1 public class Solution { 2 public void connect(TreeLinkNode root) { 3 if (root==null) return; 4 TreeLinkNode upperLevelStartNode...
分类:
其他好文 时间:
2014-09-10 20:59:11
阅读次数:
156
print all unique solution to split number n, given choice of 1 3 5 10for example if n is 4{1, 1, 1, 1}{1, 3}思路:用DFS肯定可以求解,但需要遍历所有可能,进行剪纸之后用递推实现。主要剪枝思想...
分类:
其他好文 时间:
2014-09-10 19:27:20
阅读次数:
144