摘要:
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a... 阅读全文
摘要:
然后再按从大到小的顺序,依次在第一个位置的两边,按照一左一右的顺序,依次存放剩下的数。例如:input[] = {3, 6, 1, 9, 7} output[] = {3, 7, 9, 6, 1}; input[] = {3, 6, 1, 9, 7, 8} output[] = {1, 6, 8, ... 阅读全文
摘要:
1 public class ListNode { 2 int val; 3 ListNode next; 4 ListNode(int x) { val = x; } 5 ListNode(){} 6 7 public static List... 阅读全文