yes no > yes max > no max yes max = no max figure flowchart of the decision tree approach to max of three yourself how you would solve the problem if you were asked to do the job for finding the max of three numbersyou probably don' have very good intuition about the steps you go through you' just look at the numbers and know which is the largest but what if you were handed book containing hundreds of numbers in no particular orderhow would you find the largest in this collectionwhen confronted with the larger problemmost people develop simple strategy scan through the numbers until you find big oneand put your finger on it continue scanningif you find number bigger than the one your finger is onmove your finger to the new one when you get to the end of the listyour finger will remain on the largest value in nutshellthis strategy has us look through the list sequentiallykeeping track of the largest number seen so far computer doesn' have fingersbut we can use variable to keep track of the max so far in factthe easiest approach is just to use max to do this job that waywhen we get to the endmax automatically contains the value of the largest flowchart depicting this strategy for the max of three problem is shown in figure here is the translation into python codemax if maxmax if maxmax clearlythe sequential approach is the best of our three algorithms the code itself is quite simplecontaining only two simple decisionsand the sequencing is easier to understand than the nesting used in the previous algorithm furthermorethe idea scales well to larger problemsadding fourth item adds only one more statement max