Mars123
Mars123 Mars123
  • 20-03-2017
  • Computers and Technology
contestada

Write an algorithm to find the maximum and minimum number from a given list of N numbers .Assume the list is not sorted

Respuesta :

rsmith6559
rsmith6559 rsmith6559
  • 23-03-2017
maxNumber = 0
minNumber = INT_MAX

for n in list:
  if( n > maxNumber):
   maxNumber = n
  elif( n < minNumber ):
   minNumber = n
Answer Link

Otras preguntas

PLZZ HELP ASAPA :( ILL MAKE U BRAINLIST :) ''Figure out the unknown side length of each triangle.''
Blade pays tax of $5,000 on taxable income of $50,000 while Caden pays tax of $12,000 on taxable income of $100,000. What type of tax rate structure appears to
PLEASE ANSWER ASAP WITH EXPLANATION AND WORK FOR BRAINLEST!!!!!!!!!!!!!!!!!!!! 3- 1/2x > 10 _
Students in Mr. Hill’s class were asked how many TV shows they watched last weekend. The results are shown on the line plot. A line plot titled Amount of T V Wa
Which of the following words best describes the early beginnings of Islam? A tumultuous B peaceful C surprising D mysterious
How many moles of N2 are found in 3.5 L?​
Help 35 points Which value of c markes
can someone please help me with my homeworkk
Comets are just forzen asteroids helpppppppp
There is a photo^^^^^^