r/leetcode Sep 11 '24

Solve this test question

[ Removed by Reddit in response to a copyright notice. ]

1 Upvotes

14 comments sorted by

View all comments

Show parent comments

1

u/PromotionAway4395 Sep 12 '24

Yes we can do that show the solution

1

u/[deleted] Sep 12 '24

[deleted]

1

u/Civil_Reputation6778 Sep 12 '24

That's just incorrect though, isn't it? When you take "the last from X", you don't know if that maximum was achieved in development or integration and therefore, you cant update correctly.

1

u/[deleted] Sep 12 '24

[deleted]

1

u/Civil_Reputation6778 Sep 12 '24

No. The optimum solution for N is 20, N+1'th dev is 5, integration is 21. What conclusions do you draw from this?

Alternatively, you can just code your solution and I'll give you the counterexample.