### Feature description This is a leetcode hard problem in dynamic problem.I will give a detail solution with documentation of this code ### Would you like to work on this feature? - [X] Yes, I want to work on this feature!