+ 1
Is unordered_map perfect for this problem or not
Hi Can you please suggest whether this problem can be done by other ds or unordered_map is the correct one only ? https://code.sololearn.com/c83v1ex2Aia0/?ref=app
1 Odpowiedź
+ 1
You can use a vector or array to store count of each number. Then check for each i = 1 to N if count is 0 then this is the answer.