Ejemplo n.º 1
0
 public void RotateRight_One()
 {
     Lc61RotateList obj = new Lc61RotateList();
     ListNode head = BuildList(new int[] { 1, 2, 3 });
     int k = 1;
     ListNode expectedHead = BuildList(new int[] { 3, 1, 2 });
     ListNode actualHead = obj.RotateRight(head, k);
     Assert.IsTrue(DeepEqual(expectedHead, actualHead));
 }
Ejemplo n.º 2
0
 public void RotateRight_Empty_List()
 {
     Lc61RotateList obj = new Lc61RotateList();
     ListNode head = null;
     Assert.AreEqual(null, obj.RotateRight(head, 1));
 }