Question: Discrete Mathematics for Computing Q. Modify the ALGORITHM in example 1.2.1 so that the output also includes the position in the list where the smallest
Example 1.2.1 Find the smallest number in a list of numbers. Solution The smallest number can be found by looking at each number in turn, keeping track at each step of the smallest number so far. 1. Input the number of values n 2. Input the list of numbers X1, X2, ..., xn 3. minx1 4. For i = 2 to n do 4.1. If x;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
