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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:40:05+00:00 2026-05-12T22:40:05+00:00

My program of sorting values clocks at: 100000 8s 1000000 82s 10000000 811s Is

  • 0

My program of sorting values clocks at:

  • 100000 8s
  • 1000000 82s
  • 10000000 811s

Is that O(n)?

  • 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-12T22:40:05+00:00Added an answer on May 12, 2026 at 10:40 pm

    Yes, that looks like O(n) to me – going from the 1st to 2nd case and the 2nd to 3rd case, you’ve made the input 10 times bigger, and it’s taken 10 times longer.

    In particular, it looks like you can predict the rough time by using:

    f(n) = n / 12500
    

    or

    f(n) = n * 0.00008
    

    which gives a simplest explanation of O(n) for the data provided.

    EDIT: However… As has been pointed out, there are various ways in which the data could be misleading you – I rather like Dennis Palmer’s idea that the IO cost is dwarfing everything else. For example, suppose you have an algorithm whose absolute number of operations is:

    f(n) = 1000000000000n + (n^2)
    

    In that case the complexity is still O(n^2), but that won’t become apparent from observations until n is very large.

    I think it would be accurate to say that these observations are suggestive of an O(n) algorithm but that doesn’t mean it definitely is.

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

Sidebar

Related Questions

I tried implementing a sorting program in mapreduce such that I have just the
#include<stdlib.h> #include<stdio.h> #include<string.h> //This program is a sorting application that reads a sequence of
I'm trying to create a word sorting program that will read the words in
Here is a simple sorting program of an ArrayList: ArrayList<String> list = new ArrayList<String>();
I am trying to write a program that takes an input of of n
I have to create a program that takes an input file of unsorted numbers
Why do comparisons of NaN values behave differently from all other values? That is,
I am trying to improve my C++ by creating a program that will take
Ok, so I have a simple c++ program that's supposed to run a couple
A while back we were given an assignment to write a c program that

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.