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
Lostsunrise [7]
3 years ago
5

How does a linear algorithm perform compared to a quadratic one on our imaginary race track?

Computers and Technology
1 answer:
mixer [17]3 years ago
4 0

Answer:

The linear algorithms have the efficiency O(n). And their speed is always constant. And we need to calculate the efficiency of each of the algorithms for better management and application performance. If the input is big enough then quadratic algorithms O(N*N) always perform below a linear algorithm. And hence, linear programs are better.

Explanation:

Let us take an example of single for loop.

for i in range (1,10):

    print(x)

and second one:

for i in range (1,10):

 for j in range(1,10):

     print(i*j)

In the first single for look the algorithm is linear and it runs for 10 times, and when we increase range to 100 then it runs for 100 times. or O(N) times. However, when we consider two for loops in nested form then, it runs for 10 *10 =100 times and when we increase to 100 then it becomes, 100*100=10000 times. Thus, its complexity is O(N*N). Hence, quadratic algorithms are more complex and takes longer time to be solved.

You might be interested in
DO, of X isvvvvvvvvvvvvvvv
dem82 [27]
Huh ? I don’t understand the question
8 0
3 years ago
All of the following are examples of software, except:
Bezzdna [24]
Speakers is your answer
7 0
3 years ago
Read 2 more answers
Renting provides _________ flexibility but can lead to _________ costs in the long-term.
docker41 [41]
Renting provides greater flexibility but can lead to higher costs in the long term.
3 0
3 years ago
Read 2 more answers
What is probably the most revolutionary innovation since the printing press?
BARSIC [14]

Answer:

The Internet

Explanation:

Why? The internet has done twice if not thrice what the printing press has done. The printing press allowed for dissemination of information and knowledge to the population through its mechanical movable printing capability and speed of book publishing. However its reach was highly limited by the physical attributes of the machines and having to transfer books and papers in spreading them to certain destinations. This limitation has been eliminated by the internet as one is able to receive a book written today in seconds and not physically but through electronic means. In other words, information need not be transferred physically, also accessbility and cost of getting information has been highly improved with the internet.

7 0
3 years ago
The java compiler is able to find all programmer errors.
Troyanec [42]
No compiler can do that. Maybe with AI, but that's beyond the scope of a compiler.
5 0
3 years ago
Other questions:
  • The term ________________ denotes data that is being stored on devices like a universal serial bus (USB) thumb drive, laptop, se
    9·2 answers
  • ___ are controls through which a user can enter input data in a gui application. answer
    10·1 answer
  • Without entering into the internet cloud or intranet cloud, how many icons in the topology represent endpoint devices (only one
    6·1 answer
  • We have a 16 GB main memory and 256 MB fully-associative cache, with block size of 64 bytes. We wish to store a 6 x 6 matrix in
    5·1 answer
  • ____ involves taking data from your database and putting it into an electronic file in a format that another external applicatio
    9·1 answer
  • When comparing different biometric systems, one of the most important metrics used is called the _________, which represents the
    14·1 answer
  • What did Adam and Eve look like?
    7·2 answers
  • Is the app scener safe? its a chrome webstore app on computer.​
    13·1 answer
  • What is the name of the variable in this code?
    13·2 answers
  • What is the appropriate source to find information about an organization?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!