why length of frequency array is taken 1100001?

please solve asap

as a[I] has constraints 1<=a[I]<=10^6 so you need to take a frequency array

greater than 10^6. it can be 10^6+1 or greater than it : )

as a[I] has constraints 1<=a[I]<=10^6 so you need to take a frequency array

greater than 10^6.

it can be 10^6+1 or greater than it : )