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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:15:59+00:00 2026-05-23T04:15:59+00:00

I know that this loop is O(n^2) but what is Big-Omega and Big-Theta? How

  • 0

I know that this loop is O(n^2) but what is Big-Omega and Big-Theta? How do you go about calculating them in situations like these?

for(i = 0; i < array.length; i++) 
   for (j = 0; j < array.length; j++)
      //bla bla
  • 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-23T04:16:00+00:00Added an answer on May 23, 2026 at 4:16 am

    For starters, see larsmans’ comment. The loop logic is not necessarily trivial enough to exclude. Let’s say for argument’s sake that you’re confident that the loop logic will be not break out, that the logic is trivial (i.e. no conditional paths affecting the work performed), and that you are defining your unit of work to be the total logic performed in one pass through the loop.

    In this case, your upper and lower bounds are the same. You are guaranteed to execute at least, and at most, on the order of N^2 units of work. You have a Ω(N^2), and a O(N^2). Your lower and upper bounds are identical; you can characterize Θ(N^2).

    It bears mentioning again that this is pointless if the loop logic is non-trivial and is especially dependent on what you are actually defining as a unit of work. The point of these notations is to characterize an expected amount of work to be incurred by an algorithm. You can iterate through a loop millions of times, but that doesn’t affect this notation if the work you really care about is how many times SomeExpensiveFunction() is called within that loop, and the logic dictates that it is only called once.

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

Sidebar

Related Questions

I want to know that How can I walk through this loop ? this
I know that this sort of question has been asked here before, but still
I know that this is a newbie question but I am a newbie so
I know that this has already been asked here but the answer (using a
I know that this feature will be deprecated in C++0x, but for me as
Something that really would like to know but never found out are shortcuts in
I know that this line of code will make the cell text-wrap: $objPHPExcel->getActiveSheet()->getStyle('D1')->getAlignment()->setWrapText(true); 'D1'
I know that this question must have been asked and answered a million times,
I know that this question had already been asked a couple of times before,
I know that this can be easily done by using if(i%5 == 0 OR

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.