find the maximum algorithm
TRANSCRIPT
![Page 1: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/1.jpg)
Find the Maximum Algorithm
currentIndex: 0 maxValue: -1
start with -1 as maximum
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 2: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/2.jpg)
Find the Maximum Algorithm
currentIndex: 0 maxValue: -1
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 3: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/3.jpg)
Find the Maximum Algorithm
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
currentIndex: 0 maxValue: -1
found a new maximum!
![Page 4: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/4.jpg)
Find the Maximum Algorithm
currentIndex: 0 maxValue: 5
found a new maximum!
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 5: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/5.jpg)
Find the Maximum Algorithm
currentIndex: 1 maxValue: 5
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 6: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/6.jpg)
Find the Maximum Algorithm
currentIndex: 2 maxValue: 5
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 7: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/7.jpg)
Find the Maximum Algorithm
currentIndex: 3 maxValue: 5
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 8: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/8.jpg)
Find the Maximum Algorithm
currentIndex: 4 maxValue: 5
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
found a new maximum!
![Page 9: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/9.jpg)
Find the Maximum Algorithm
currentIndex: 4 maxValue: 9
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
found a new maximum!
![Page 10: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/10.jpg)
Find the Maximum Algorithm
currentIndex: 5 maxValue: 9
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 11: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/11.jpg)
Find the Maximum Algorithm
currentIndex: 6 maxValue: 9
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 12: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/12.jpg)
Find the Maximum Algorithm
currentIndex: 7 maxValue: 9
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 13: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/13.jpg)
Find the Maximum Algorithm
currentIndex: 8 maxValue: 9
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8
![Page 14: Find the Maximum Algorithm](https://reader036.vdocument.in/reader036/viewer/2022092617/58ad67201a28ab9e428b5839/html5/thumbnails/14.jpg)
Find the Maximum Algorithm
currentIndex: 8 maxValue: 9
Finished: output is 9
5 3 1 2 9 8 7 3 9
0 1 2 3 4 5 6 7 8