I was ask in one of my course in the university to select an exist dynamic algorithm and build it using backtracking algorithm and here is the code.