We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
For the test case:
3
1 2 --> [2]
1 1 --> [2,2]
2 --> [2]
3 --> (it will display 2, but it should have displayed 1)
This solution passes all the test cases, but how is it working ?
I mean, is that anything that i am not getting?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Maximum Element
You are viewing a single comment's thread. Return to all comments →
For the test case:
3
1 2 --> [2]
1 1 --> [2,2]
2 --> [2]
3 --> (it will display 2, but it should have displayed 1)
This solution passes all the test cases, but how is it working ? I mean, is that anything that i am not getting?