Ask Question

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

+1
Answers (1)
  1. 1 January, 15:17
    0
    MaxNumber = 0

    minNumber = INT_MAX

    for n in list:

    if (n > maxNumber):

    maxNumber = n

    elif (n < minNumber):

    minNumber = n
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write an algorithm to find the maximum and minimum number from a given list of N numbers. Assume the list is not sorted ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers