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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:26:39+00:00 2026-05-25T10:26:39+00:00

I was task with a problem to write a test program to evaluate the

  • 0

I was task with a problem to write a test program to evaluate the computational complexity (Big O) of the following problem and really dont know where to start.

  1. A single loop iterated n times
  2. A nested loop where eaach loop is iterated n times

This is what I was able to produce

for(int i=0; i <n; i++){
   // Do stuff
}

The problem now is how to write the test program. Can someone help me out?

  • 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-25T10:26:40+00:00Added an answer on May 25, 2026 at 10:26 am

    From what you described, the complexity of the algo seems to be O(n ^ 2).
    It can be possible to try evaluating it “experimentally”: just run the algo with different n values and take the computation times. Then plot the n values on the x axis of a graph and the time values on the y axis. You should now see something approximable with a parabola.

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

Sidebar

Related Questions

So i've got a problem in my java homework. The task is to write
The task is to take a list of tables which is changeable. Write a
can somebody help me to write a sql select to perform a task. So
I am given task to write a script (or better yet, a daemon), that
I've written the following program which purpose is to create a file of a
I am trying to write a test case using xUnit.net and the AutoRollback attribute
I'm having a problem with a task similar to this one: click (translated) (the
before write a record in db i have to do this task: 1- Read
I've been given the task to write a plugin for Trac. It should provide
I'm trying to write a simple task using Maven: <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.3</version> <executions> <execution>

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.