could you please explain this question a bit more please? For example, I don't get why creating the table of N length helps to solve the problem in the first place. Thanks!
I decided to show how the bottom-up DP would be done at the start so it fitted with the editorial better and could translate to languages where there is no LRU-cache.
could you please explain this question a bit more please? For example, I don't get why creating the table of N length helps to solve the problem in the first place. Thanks!