Let's say that you are given an integer array A of size n. You know in advance that O(√n) elements of A can be larger than 2020(n)^(5) − 5n, and the remaining elements of A are in the range [1, 2020n^5 − 5n]. It turns out that, in this case, A can be sorted in O(n) time in the worst case.
I am trying to solve this interesting algorithm question and my intuition is to use radix sort as part of my solution. The part that stumps me is the O(√n) runtime, so any pointers in finding such an algorithm would be greatly appreciated!