Please help me with error

@adarshsingh2k
your code had 2 mistakes:

  1. you cannot make 1e6 array in any function, you have to make in outside.
  2. you did not did j++ while assigning back the values.
    https://ide.codingblocks.com/s/297198