How to solve this dynamic programming problem from Geeksforgeeks contest ?

Revision en1, by Greatest789, 2020-10-22 07:29:32

Link of the problem :

https://practice.geeksforgeeks.org/contest-problem/bjorn-ironside/1/

![ ](geeksforgeeks)

In the hints section , they only mentioned the code of solution , which seems to involve digit dynamic programming . Can somebody explain solution to this problem or at least explain what the dp states are ? Thankyou .

Code given by them for this problem : (C++ code written in leetcode contest type format)

Code
Tags digit dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Greatest789 2020-10-22 07:29:32 1635 Initial revision (published)