Amazon Interview Question

R1 had easy questions on based on stack, trees. R2 questions were based on dp and graphs.