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

  • Home
  • SEARCH
  • 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 463573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:11:18+00:00 2026-05-12T23:11:18+00:00

I just have a simple question, why is the big O notation of a

  • 0

I just have a simple question, why is the big O notation of a sorted array O(log N)? It will be a sorted array.

  • 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-12T23:11:18+00:00Added an answer on May 12, 2026 at 11:11 pm

    Big O notation generally makes sense in context of an algorithm. What operation are you considering when you say the Big O notation is O(log n).

    If you mean searching, then it is O(log n) because you can use binary search. Which essentially means you look at the middle element of you array, and if it is greater than the element you’re searching for, you then search the larger half (in the same way), and vice versa (assuming you haven’t yet found your element of course). You can read a more detailed description on wikipedia.

    At each step of searching (looking the middle element), you are cutting the size of the array you must search in half since you can now know which side of the middle element your search element must lie. Of course this only works with sorted arrays. For non-sorted arrays, the only search algorithm you can use is linear search where you examine every element in the array which will take on average n/2 inspections.

    In general, Big O describes the runtime characteristics of algorithms, so you can’t just ask, what is the Big O of a sorted array, it must be some operation on the array. However, you can consider Big O in terms of the space (memory) taken by some data structure. In this case a sorted array still takes O(n) space to store N elements.

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

Sidebar

Related Questions

I have a simple class that essentially just holds some values. I have overridden
I'm just trying to do simple scripting with F#, and Math.PI seems to have
Probably simple question and I'm just missing something, but I'm stuck out of ideas.
Just a question about best-practices when upgrading an existing database. Assuming there will be
I have a simple question. If I have a for loop in python as
I have a simple question about finding a regular expression for a given language.
I just want to ask a simple question related the GLSurfaceView and drawn objects
I just have started to learn Haskell and combine reading books and tutorials with
I've recently decided that I just have to finally learn C/C++, and there is
I am reading a text file with this format: grrr,some text,45.4321,54.22134 I just have

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.