You are viewing a single comment's thread. Return to all comments →
I solved it in the same manner. O(2xN) is O(N). This does not need DP at all.
Candies
You are viewing a single comment's thread. Return to all comments →
I solved it in the same manner. O(2xN) is O(N). This does not need DP at all.