Frage im Vorstellungsgespräch bei Walmart

1. Simple DP program.

Antwort im Vorstellungsgespräch

Anonym

7. Aug. 2020

Solved it in an optimal way, covered all the edge cases. The interviewer did not understand the approach. I traced the program and also shown the output. Interviewer wanted me to solve the problem in some other way. Not sure what was the expectation.