LCA
LCA Using Binary Lifting k=0 means the parent node Create a table P[K][N] -> N is number of nodes 2^k<=N So k<=logN Hence Size of table is N*logN jumps are made in order of powers of 2 ->1,2,4...etc trying to divide by 2 let mid=par[i][k-1] (2^(k-1)th parent if exists) par[i][k] is par[mid][k-1] Its basically dividing a big jump into 2. First make 2 nodes that we are going to find LCA to same depth using Walk function if current jump results -1 then we have jumped of the table.