public static void main(String[] args) {
    ListNode<Integer> l1 = new ListNode<Integer>();
    ListNode<Integer> l2 = new ListNode<Integer>();
    l1.GetSampleList(new Integer[] {1, 2, 3, 4});
    l2.GetSampleList(new Integer[] {5, 6, 7, 8, 9, 10});

    SecondTry(l1, l2);
    //		ListNode[] res = mergeAlternative(l1, l2);
    //		res[0].PrintList();
    //		res[1].PrintList();
  }
Пример #2
0
  public static void main(String[] args) {
    ListNode head = new ListNode();
    head.GetSampleList(new Integer[] {10, 20, 30, 40, 50, 60, 70, 80, 90, 100});
    int k = 3;

    ListNode res = RotateList(head, k);
    res.PrintList();
  }
Пример #3
0
 public static void main(String[] args) {
   ListNode head = new ListNode();
   head.GetSampleList(new Integer[] {1, 2, 3, 4, 5, 6, 7, 8});
   NAfterMMore(head, 2, 2).PrintList();
 }