首页 > TAG信息列表 > SLinkedList
25. Reverse Nodes in k-Group
SLinkedList<int> slist = new SLinkedList<int>(); slist.AppendRange(new[] { 1, 2, 3, 4, 5 }); Console.WriteLine("Input: " + slist.Print()); Console.WriteLine("k=2"); var rslt = slist.RotateRight(2); Console.WriteLine(rslt.Pr25. Reverse Nodes in k-Group
SLinkedList<int> slist = new SLinkedList<int>(); slist.AppendRange(new[] { 1, 2, 3, 4, 5 }); Console.WriteLine("Input: " + slist.Print()); Console.WriteLine("k = 2"); var rslt = slist.ReverseKGroup(2); Console.WriteLine(&qu23. Merge k Sorted Lists
SLinkedList<int> slist = new SLinkedList<int>(); slist.Append(12); slist.Append(2); slist.Append(43); Console.WriteLine(slist.Print()); SLinkedList<int> slist2 = new SLinkedList<int>(); slist2.Append(11); slist2.Append(3); slist2.