please give an solution without it as in this course dp is not taught
hi @computer.engineer.veenit.kumar refer