OYO interview question

one war dp and other backtacking