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
Yuliya22 [10]
2 years ago
6

How do we find the time complexity for this algorithm?

Computers and Technology
1 answer:
gizmo_the_mogwai [7]2 years ago
8 0

Answer:

For any loop, we find out the runtime of the block inside them and multiply it by the number of times the program will repeat the loop. All loops that grow proportionally to the input size have a linear time complexity O(n) . If you loop through only half of the array, that's still O(n) .

You might be interested in
Identify the hardware components in your own computer. If you don't have a computer, use a friend's, or one at work or in an NVC
sergij07 [2.7K]

Solution :

A friend of mine have an old version of computer PC having the following components :

Input devices

Model name of the keyboard -- PUNTA , model number -- P-KB515

Model name of the mouse -- PUNTA, model number -- P-KB515

Output devices

Speaker : COMPAQ

Monitor : ACER,  Model Number  --- EB192Q

Storage : 500 MB capacity hard disk

RAM : 2 GB

Processor : Intel Pentium dual E1260 at the rate 1.80 GHz

It is provided with audio jacks

5 0
2 years ago
Alkane is a Variety of which fruit
icang [17]
Several different alkane fruits.
watermelon cantaloupe mango pears grapes passion fruit dried fruits like dates and apricots figs and raisins are also considered heavy alkaline foods apples, fresh apricots bananas berries and avocados.... list goes on.
4 0
3 years ago
Here is the list of problems to choose from:
olya-2409 [2.1K]

Answer:

There's a parking lot that is 600m² big. The lot must be able to hold at least 3 buses and 10 cars.

Each car takes up 6m² and each bus takes up 30m².

However, there can only be 60 vehicles in the lot at any given time.

The cost to park in the lot is $2.50 per day for cars and $7.50 per day for buses. The lot must make at least $75 each day to break even.

What is a possible car to bus ratio that would allow the lot to make profit?

3 0
3 years ago
For two integers m and n, their GCD(Greatest Common Divisor) can be computed by a recursive function. Write a recursive method g
konstantin123 [22]

Answer:

In Python:

def gcd(m,n):

if n == 0:

 return m

elif m == 0:

    return n

else:

 return gcd(n,m%n)

Explanation:

This defines the function

def gcd(m,n):

If n is 0, return m

<em> if n == 0: </em>

<em>  return m </em>

If m is 0, return n

<em> elif m == 0: </em>

<em>     return n </em>

If otherwise, calculate the gcd recursively

<em> else: </em>

<em>  return gcd(n,m%n)</em>

<em />

<em>To call the function to calculate the gcd of say 15 and 5 from main, use:</em>

<em>gcd(15,5)</em>

6 0
3 years ago
What is the reddish-brown substance in the water?
Mariulka [41]

Answer:

iron

Your water might be affected by iron, which is a commonly-occurring constituent of drinking water. Iron tends to add a rusty, reddish-brown (or sometimes yellow) color to water. If the color is more black than red, your water might contain a combination of iron and manganese.

5 0
3 years ago
Read 2 more answers
Other questions:
  • For a color display using 8 bits for each of the primary colors (red, green, blue) per pixel, what should be the minimum size in
    6·1 answer
  • "what should you do if the system continually reboots and you can't read the error message produced on a blue screen
    11·2 answers
  • You type. The word "weather" when you ment "whether" when will the writer or word flag this as a misspelling or a grammar proble
    13·1 answer
  • Which type of denial of service attack exploits the existence of software flaws to disrupt a service?
    12·1 answer
  • Programa en C
    9·1 answer
  • Targeting encourages drivers to scan far ahead and _____________. A. focus their visual attention on the next point on the road
    8·2 answers
  • RFID tags uses memory that is read-only.A. TrueB. False
    5·1 answer
  • What are the possible consequences of intentional virus setting?
    14·1 answer
  • Compare and contrats the vain digestive system from the human digestive system.​
    10·1 answer
  • A software copyright?​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!