A Python example is provided for the prev example, but a Java version is missing. Is it intended? or can it be provided?
https://leetcode.com/explore/learn/card/dynamic-programming/633/common-patterns-continued/4144/