Karine EM CodeU 2017: Assignments 1 and 2.
First two args are for Q1. and the last two args are for Q2.
E.g., Listen Silent 2 34,9,8,10,1,2,-1,99
And shall output: ** Q1: Listen is a permutation of Silent ** ** Q2: the 2-th to the last element is 2 **
Add no args Run Unit-test
First argument is a list in BFS representing the input tree, the second argument is the path of the node for Q1. and the last two arguements are the paths of the nodes for Q2. Path is the letters: T,R,,L,P. Need to start with T
- T = Get Root
- P = Get parent
- L = Get Left
- R = Get Right
E.g., "1,2,3,4,5,6,7,8,9,0,1,2,3,4,5", "TLLL", "T", "TLL"
And shall output: ** Q1: Run Alg. ** 4,2,1. Done printAncestors(..).
** Q2: Run Alg. ** Common is: 1
Add no args Run Unit-test