public void RotateRight_Ten() { Lc61RotateList obj = new Lc61RotateList(); ListNode head = BuildList(new int[] { 1, 2, 3, 4, 5 }); int k = 10; ListNode expectedHead = BuildList(new int[] { 1,2,3,4,5 }); ListNode actualHead = obj.RotateRight(head, k); Assert.IsTrue(DeepEqual(expectedHead, actualHead)); }
public void RotateRight_Empty_List() { Lc61RotateList obj = new Lc61RotateList(); ListNode head = null; Assert.AreEqual(null, obj.RotateRight(head, 1)); }