You are viewing a single comment's thread. Return to all comments →
while it passes all test cases, it is not correct when array has repeated values. For example, input
6 1 1 1 2 2 3 3
yields 4 as output while it should be 8.
4
8
Seems like cookies are disabled on this browser, please enable them to open this website
Pairs
You are viewing a single comment's thread. Return to all comments →
while it passes all test cases, it is not correct when array has repeated values. For example, input
yields
4
as output while it should be8
.