Is 2n+constant a good big o notation for a sorting algorithm?

I have an assignment in a comp sci class to develop the fastest sort possible and found this to be the big o notation for my algorithm. The constant is based off the highest value in the sort.

geeknick
-3
Newbie Poster

## Recommended Answers

Jump to PostIs 2n+constant a good big o notation for a sorting algorithm?

Yes, that's excellent relative to the usual suspects such as quicksort and mergesort, and it hints at the algorithm as well because comparison-based sorting algorithms have a hard bottom of Omega(nlogn). If you've dropped into linear territory your algorithm …

## All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.