OneCompiler

TwoSum

10
unordered_map<int, int> seen;

for(int i  = 0, i < my_vect.size(); i++):
  int current = my_vect[i]
  
  int need = target - current
  
  if(seen.count(need)):
    return {current, need}
    
  seen[current] = 1
  
  
Question: What is the downside for this algorithm?