public void Run() { ListNode <int> head = new ListNode <int>(new int[] { 1, 2, 3, 4, 5, 6 }); ListNode <int> .PrintListNode(head); RotateRight(head.PrintListNode(), 3).PrintListNode(); }
public void Run() { ListNode <int> head = new ListNode <int>(new int[] { 9, 8, 9 }); Test.Verify(true, IsPalindrome(head.PrintListNode())); }
public void Run() { ListNode <int> head = new ListNode <int>(new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }); ReverseKGroup(head.PrintListNode(), 3).PrintListNode(); }