Math, asked by biswadipsarkar5840, 11 months ago

How can be a largest number ina alist of 20 numbers be found?

Answers

Answered by janhaviborase
0

Step-by-step explanation:

A linear search will use O(20) steps, that is, constant time:

On input x1,…,x20

Let max=x1

For i=2 to 20

If xi>max then let max=xi

I hope this is efficient enough for you.

Similar questions