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
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.