Dynamic Programming: Tennis Balls, Lockers, and Keys [closed]
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I am having trouble finding the Optimal Dynamic Programming solution to a problem and would greatly appreciate any help. The optimal solution is O(T^2+M); I can only find a solution which is O(NM^2). The problem is: There are N lockers that are labeled 1,2...N. Each locker is