Skip to main content
edited tags
Link
xskxzr
  • 7.6k
  • 5
  • 23
  • 47
Improved question title, simplified the range
Source Link
xskxzr
  • 7.6k
  • 5
  • 23
  • 47

given an array A$A$ of n$n$ numbers in range $1$ to $nlogn$$n\log n$, what is the time complexity of the best method to sort them?

The answer is $O(n)$ but I don't understand this. of course counting sort itself is irrelevant, perhaps radix sort with base changing is the way to go, but I'm not sure of to change the base of $nlogn$$n\log n$.

given an array A of n numbers in range $1$ to $nlogn$, what is the time complexity of the best method to sort them?

The answer is $O(n)$ but I don't understand this. of course counting sort itself is irrelevant, perhaps radix sort with base changing is the way to go, but I'm not sure of to change the base of $nlogn$.

given an array $A$ of $n$ numbers in range $1$ to $n\log n$, what is the time complexity of the best method to sort them?

The answer is $O(n)$ but I don't understand this. of course counting sort itself is irrelevant, perhaps radix sort with base changing is the way to go, but I'm not sure of to change the base of $n\log n$.

Improved question title, simplified the range
Source Link

best Best time complexity of arraysorting numbers in range [0[1...nlogn-1]n log n]

given an array A of n numbers in range $0$$1$ to $nlogn-1$$nlogn$, what is the time complexity of the best method to sort them?

The answer is $O(n)$ but I don't understand this. of course counting sort itself is irrelevant, perhaps radix sort with base changing is the way to go, but I'm not sure of to change the base of $nlogn$.

best time complexity of array range [0...nlogn-1]

given an array A of n numbers in range $0$ to $nlogn-1$, what is the time complexity of the best method to sort them?

The answer is $O(n)$ but I don't understand this. of course counting sort itself is irrelevant, perhaps radix sort with base changing is the way to go, but I'm not sure of to change the base of $nlogn$.

Best time complexity of sorting numbers in range [1...n log n]

given an array A of n numbers in range $1$ to $nlogn$, what is the time complexity of the best method to sort them?

The answer is $O(n)$ but I don't understand this. of course counting sort itself is irrelevant, perhaps radix sort with base changing is the way to go, but I'm not sure of to change the base of $nlogn$.

added 7 characters in body
Source Link
chendoy
  • 307
  • 1
  • 3
  • 7
Loading
Source Link
chendoy
  • 307
  • 1
  • 3
  • 7
Loading