You are viewing a single comment's thread. Return to all comments →
Try to use a queue to store the expected pair for each elements. It is possible to run in O(N).
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 →
Try to use a queue to store the expected pair for each elements. It is possible to run in O(N).