+ 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

7th Jul 2020, 9:05 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 ответ
+ 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.
7th Jul 2020, 10:04 AM
R_3-dr
R_3-dr - avatar