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 6953797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:31:29+00:00 2026-05-27T14:31:29+00:00

For example, in sorting the tight lower bound is N*log(N) where N is the

  • 0

For example, in sorting the tight lower bound is N*log(N) where N is the size of the array

how about for searching in a sorted array? I think it’s log(N) but I’m not 100% sure.

also everything is based on comparisons, no any other external memory than the input array itself can be used

thanks in advance

  • 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-05-27T14:31:29+00:00Added an answer on May 27, 2026 at 2:31 pm

    The optimal solution for searching a simple sorted array is a Binary Search, which has time complexity O(log₂(N)). The worst case happens when the searched-for element is not in the array, and takes exactly ⌊log₂(N) + 1⌋ iterations. See Binary Search Performance.

    I believe you can only talk about “tightness” when referring to the upper AND lower bounds of complexity. Lower bound (big Omega) is generally more difficult to compute, and often not as useful as upper bound (big O). Tight bound (big Theta) takes both upper and lower bounds into account.

    Technically the lower bound is Ω(1), because you can find the searched-for element on the first comparison. See Is binary search theta log (n) or big O log(n) for further discussion of the time complexity of binary search.

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

Sidebar

Related Questions

been searching for a quick example of sorting a IQueryable (Using Linq To SQL)
I've searched for an example of sorting a DataGridView on multiple columns, but don't
How would I go about sorting an array of NSString Objects by a custom
Possible Duplicate: jQuery tablesorter - Not sorting column with formatted currency value This http://tablesorter.com/docs/example-meta-parsers.html
Trying to follow this example. (Section String sorting...) Is there anything obvious that would
I'm having a problem sorting my derived classes with the STL sort function. Example
How can I implement STL map sorting by value? For example, I have a
example: I want to see if array[5] holds a value or is empty.
I have a problem getting sorting to work with multiple joined tables. For example:
is it possible to disable onclick= while sorting? I Have a working example here

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.