1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kumpel [21]
3 years ago
6

Suppose for the worst case, given input size n: Algorithm 1 performs f(n) = n2 + n/2 steps Algorithm 2 performs f(n) = 12n + 500

steps What is the smallest value of n for which algorithm 2 will be faster than algorithm 1?
Computers and Technology
1 answer:
melomori [17]3 years ago
6 0

Answer:

29

Explanation:

for n=28:

--------------

Algorithm 1 performs f(n) = n2 + n/2 = 28*28 + 28/2 = 798

Algorithm 2 performs f(n) = 12*28 + 500 = 836

for n=29

--------------

Algorithm 1 performs f(n) = n2 + n/2 = 29*29 + 29/2 = 855.5

Algorithm 2 performs f(n) = 12*29 + 500 = 848

so, for n=29, algorithm 2 will be faster than algorithm 1

You might be interested in
Trisha is looking for a new table style. What is the fastest way for her to preview how different styles in the gallery would lo
Elena-2011 [213]

Answer: The correct answer is to hover the cursor over the different styles in the gallery.

Explanation: The fastest way to preview the different styles in the style gallery is to hover the cursor over each style. This will preview the style, without making the permanent change so that you can see how it looks without changing to each individual style.

4 0
3 years ago
Which kind of image is indispensable and needs added text to go with ?
Harrizon [31]

Explanation:

A map is the correct answer hope that helps you.

4 0
3 years ago
Can you give me a long list of kid's cartoons
notka56 [123]
Gravity Falls
Adventure Time 
SpongeBob SquarePants,
Cailou 
Bubble Guppies
Dora
Teletubbies
4 0
3 years ago
Read 2 more answers
which application software allows you to compose written ideas on a computer? database, spreadsheet, word processor or graphics
Kazeer [188]
Word processor because it's more for writing
8 0
3 years ago
CODEHS 3.5.4 Obi-Wan Says
Likurg_2 [28]

The program receives inputs for the name, number of droids and wookiees a user wants and displays the information as a complete sentence. The program written in python 3 goes thus :

name = input('Enter name : ')

<em>#</em><em> </em><em>prompts</em><em> </em><em>user</em><em> </em><em>of</em><em> </em><em>name</em><em> </em>

num_droid = int(input('number of droids : '))

<em>#prompts</em><em> </em><em>for</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>droids</em><em> </em>

num_wooks = int(input('number of wookiees : '))

<em>#prompts</em><em> </em><em>for</em><em> </em><em>number</em><em> </em><em>of</em><em> </em><em>wookiees</em><em> </em>

print(name, ' wants to meet', num_droid, 'droids and',num_wooks , 'Wookiees' )

<em>#displays</em><em> </em><em>the</em><em> </em><em>information</em><em> </em><em>as</em><em> </em><em>a</em><em> </em><em>complete</em><em> </em><em>sentence</em><em> </em>

<em>A</em><em> </em><em>sample</em><em> </em><em>run</em><em> </em><em>of</em><em> </em><em>the</em><em> </em><em>program</em><em> </em><em>is</em><em> </em><em>attached</em><em> </em>

<em>Learn</em><em> </em><em>more</em><em> </em><em>:</em><em> </em><em>brainly.com/question/25506437</em>

5 0
3 years ago
Other questions:
  • PLEASE HELP ASAP!!!
    15·2 answers
  • What are scape codes and the effectes on out put
    6·1 answer
  • For homework, we have to figure out what's in the picture. It's " too close to tell " but I can't figure out what it is. Any ide
    11·1 answer
  • Write a method called makeLine. The method receives an int parameter that is guaranteed not to be negative and a character. The
    11·1 answer
  • The ________ phase is a technical blueprint for a whole system which captures all aspects of how the system's components will fu
    9·1 answer
  • After you select a cell with an error indicator, you can click the error checking _______ to display additional information abou
    14·1 answer
  • Two routers connect with a serial link, each using its S0/0/0 interface. The link is currently working using PPP. The network en
    6·1 answer
  • Set screw compression and indenter are all types of
    13·2 answers
  • Write a class Bug that models a bug moving along a horizontal line. The bug moves either to the right or left. Initially, the bu
    13·1 answer
  • The area that we can see just after windows is started is subject​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!