the next two passes over the cards are illustrated below in the second pass the card with the second largest face value is positioned in the next-to-last position in the third and final passthe first two cards will be positioned correctly after swapping the two cardsall of the cards are now in their proper orderfrom smallest to largest (pass repeat the process on the first two cards compare the and since is larger than swap the two cards the second largest card ( is now in its ordered position compare the and since is larger than swap the two cards (pass repeat the process on the first three cards compare the and since is less than leave them as is listing provides python implementation of the bubble sort algorithm figure illustrates the swaps performed during the first pass of the algorithm when applied to an array containing integer values figure shows the ordering of the values within the array after each iteration of the outer loop the efficiency of the bubble sort algorithm only depends on the number of keys in the array and is independent of the specific values and the initial arrangement of those values to determine the efficiencywe must determine the total number of iterations performed by the inner loop for sequence containing values the outer loop is executed times since the algorithm makes passes over the sequence the number of iterations for the inner loop is not fixedbut depends on the current iteration of the outer loop on the first pass over the sequencethe inner loop executes timeson the second passn timeson the thirdn timesand so on until it executes once on the last pass the total number