computer program isn' able to glance over the data in this way it can compare only two players at one time because that' how the comparison operators work this tunnel vision on the part of algorithms will be recurring theme things may seem simple to us humansbut the algorithm can' see the big picture and mustthereforeconcentrate on the details and follow some simple rules the three algorithms in this all involve two stepsexecuted over and over until the data is sorted compare two items swap two itemsor copy one item howevereach algorithm handles the details in different way bubble sort the bubble sort is notoriously slowbut it' conceptually the simplest of the sorting algorithms and for that reason is good beginning for our exploration of sorting techniques bubble sort on the baseball players imagine that you're near-sighted (like computer programso that you can see only two of the baseball players at the same timeif they're next to each other and if you stand very close to them given this impedimenthow would you sort themlet' assume there are playersand the positions they're standing in are numbered from on the left to - on the right the bubble sort routine works like thisyou start at the left end of the line and compare the two kids in positions and if the one on the left (in is talleryou swap them if the one on the right is talleryou don' do anything then you move over one position and compare the kids in positions and againif the one on the left is talleryou swap them this sorting process is shown in figure here are the rules you're following compare two players if the one on the left is tallerswap them move one position right