Infosys Interview Question

trees dp and hasmaps were majorly asked