https://www.codechef.com/viewsolution/17785493 https://www.codechef.com/viewsolution/17665036 https://www.codechef.com/viewsolution/17815955 https://www.codechef.com/viewsolution/17627180 just take array size 100000 and fill each value by a particular number like 259 and there are a lot others .. asked 12 Mar, 17:39

time complexity is actually $O(N\log{MAX})$, where MAX is maximum number in the array. Refer to this explanation TIME COMPLEXITY EXPLANATION. Upvote it if you find it helpful I need karma points to contribute to the community (I don't have any now) answered 13 Mar, 13:24
