Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9236841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:23:43+00:00 2026-06-18T07:23:43+00:00

This is a very simple question but I’m struggling too much to understand the

  • 0

This is a very simple question but I’m struggling too much to understand the concept completely.

I’m trying to understand the difference between the following statements:

  1. There exists an algorithm which sorts an array of n numbers in O(n) in the best case.
  2. Every algorithm sorts an array of n numbers in O(n) in the best case.
  3. There exists an algorithm which sorts an array of n numbers in Omega(n) in the best case.
  4. Every algorithm sorts an array of n numbers in Omega(n) in the best case.

I will first explain what is driving me crazy. I’m not sure regarding 1 and 3 – but I know that for one of them the answer is correct just by specifying one case and for the other one the answer is correct by examining all the possible inputs. Therefore I know one of them must be true just by specifying that the array is already sorted but I can’t tell which.
My teacher always told me to think about it like we are examining who’s the heighest guy in the class and again by one of these options(1,3) it’s enough to say that he is and there is no reason to examine all the class.

I do know that if we were to examine the worst case then none of these statements could be true because the best sorting algorithm without any assumptions or additional memory is Omega(nlogn).

IMPORTANT NOTE: I’m not looking for a solution (an algorithm which is able to do the matching sort) – only trying to understand the concept a little better.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:23:44+00:00Added an answer on June 18, 2026 at 7:23 am

    The difference, obviously, is in terms “O” and “Omega”. One says “rising not faster than”, second says “rising not slower than”.

    Make sure that you understand the difference between those terms, and you’ll see the difference in the sentences.

    1 and 3 both state completely different things, just as 2 and 4 are.

    Look at those (those are NOT the same!):

    1~ there exists an algorithm that for 10 items doesn’t take more than 30 in the best case.
    3~ there exists an algorithm that for 10 items doesn’t take less than 30 in the best case.

    2~ every algorithm that for 10 items takes not more than 30 in the best case.
    4~ every algorithm that for 10 items takes not less than 30 in the best case.

    Do you sense the difference now? With O/Omega the difference is similar, but the subject of investigation differs. The examples above say about different performance in some point/case, while O/Omega notation tell you about the performance, related to the size of data, but only if the data “is large enough”, be it three items or milions, and it drops constant factors:

    function 1000000*n is O(n)
    function 0.00000*n*n is O(n^2)
    

    For small amounts data, second one is obviously very very better than first. But as the quantity of data rises, soon the first starts to be much better!

    Rewriting the above examples into “more proper” terms, that are more similar to your original sentences:

    1~ there exists an algorithm that, for more than N items, doesn’t take more than X*N in the best case.
    3~ there exists an algorithm that, for more than N items, doesn’t take less than X*n in the best case.

    2~ every algorithm that, for more than N items, takes not more than X*N in the best case.
    4~ every algorithm that, for more than N items, takes not less than X*N in the best case.

    I hope that this helps you with “seeing”/”feeling” the difference!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may seem like a very simple question, but I have been struggling with
I know this is a very simple question but I have been struggling with
This is more then likely a very simple question but I am completely stumped
This might be a very simple question but after much searching on different forums
This is a very simple, probably too simple question but I'm afraid my limited
This may be very simple question,But please help me. i wanted to know what
This is probably a very simple question but I'm a little confused how this
This looked like a very simple question but I couldn't find the answer. How
I know this is probably a very simple question but how would I do
This is a very simple question, but I can't seem to find something about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.