static void TestScratchSearchBstRecursion(int[] values, int k) { Scr.Scratch s = new Scr.Scratch(); var root = CreatTreeNodesNonGeneric(values); var result = s.SearchBstRecursion(root, k); }
static void TestScratchSearchBst(int[] values, int k) { Scr.Scratch s = new Scr.Scratch(); var root = CreatTreeNodesNonGeneric(values);// new int[] { 4, 2, 7, 1, 3 }); var result = s.SearchBst(root, k); }
static void TestScratchSwapPairs() { Scr.Scratch s = new Scr.Scratch(); var head = CreateListNode(); s.SwapPairs(head); }
static void TestSwap() { Scr.Scratch s = new Scr.Scratch(); var head = CreateListNode(); // var result = s.Swap(head); var result = s.SwapRecursion(head); }
static void TestLinkedLists() { Scr.Scratch s = new Scr.Scratch(); var head = CreateListNode(3); var ans = s.ReverseListRecursion(head); // var ans = s.ReverseList(head); }
static void TestScratch() { Scr.Scratch s = new Scr.Scratch(); var chars = "12345".ToCharArray(); s.ReverseString(chars); // s.printReverse("abcde".ToCharArray()); }