摘要: 1 class Solution { 2 public ListNode rotateRight(ListNode head, int k) { 3 if(head == null) return null; 4 int n = 0; 5 ListNode node1 = head; 6 ListNode las... 阅读全文
posted @ 2018-09-13 13:21 jasoncool1 阅读(99) 评论(0) 推荐(0)
摘要: 1 class Solution { 2 public int[] plusOne(int[] digits) { 3 int n = digits.length; 4 int[] res = new int[n+1]; 5 int carry = 0; 6 for(int i = n - 1; i >= 0; ... 阅读全文
posted @ 2018-09-13 11:52 jasoncool1 阅读(204) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/permutation-sequence/discuss/22508/An-iterative-solution-for-reference 阅读全文
posted @ 2018-09-13 11:08 jasoncool1 阅读(112) 评论(0) 推荐(0)
摘要: 跟spiral matrix类似 阅读全文
posted @ 2018-09-13 07:23 jasoncool1 阅读(116) 评论(0) 推荐(0)