Binary Lifting — Kth ancestor queries

Binary Lifting(DP on trees). Many of you must have heard about binary lifting and must have been intimidated by the thought of it(even i…