Блог пользователя dorasainath955

Автор dorasainath955, история, 7 недель назад, По-английски

Submission this is the problem I'm trying to solve, my approach is to create a map that consists of each element and their frequency count, then for intial MEX i try to find elements less than MEX and such that x%(mp[i]-MEX)==0 and mp[i]>1. i try to convert that repeating element into MEX, if i couldn't I'll break out and print the MEX as answer, else I'll repeat the process until i reach size of array n. Where am i going wrong?

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится