SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 305 Weeks Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 16 Oct 2017 My Price 7.00

Big-O is an estimate of how long a section of code takes to run.

I need help with this questions about BIg-O.

 

Problems 1-10: Write the Big-O for each group of loops in the program(attached)

SHOW YOUR WORK for each of your answers. use any word processor to type the answers.

 

Steps to take to complete the selftest

1. Big-O is an estimate of how long a section of code takes to run. 

2. For each problem, you need to ask yourself this question: "How many times will the loop repeat itself?" 

3. O(1) means that the loop repeats a constant number of times. In other words, the loop repeats the same number of times, which is a small number. 

4. O(log n) means that the counter is doubling, tripling, quadrupling, etc., so the loop repeats log(n) times. Usually, we are multiplying or dividing the loop counter. 

5. O(n) means that the loop repeats the same number of times as n. Usually, we are adding to or subtracting from the loop counter. 

6. O(2^n) means that the loop repeats the 2^n (2 to the power of n) number of times.

7. If the loops are nested, you multiply the Big-O terms, so O(1) is canceled out by the other Big-O terms. 

8. If the loops are separate, you add the Big-O terms, so the largest (slowest run time) term cancels out all the smaller (faster run time) terms.

Answers

(5)
Status NEW Posted 16 Oct 2017 02:10 PM My Price 7.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)