Advertisement
Guest User

Insertion Sort Issues

a guest
Apr 11th, 2022
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. Name, aisle, location, price? peanut butter, 3, 5, 1.75
  2.  
  3. Name, aisle, location, price? fuji apples, 2, 8, 1.50
  4.  
  5. Name, aisle, location, price? bananas, 2, 1, 2.00
  6.  
  7. Name, aisle, location, price? potato chips , 3, 3, 2.50
  8.  
  9. Name, aisle, location, price? cookies,10,5,0.75
  10.  
  11. Name, aisle, location, price? done
  12.  
  13. start first while loop [['peanut butter', '3', '5', '1.75'], ['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['potato chips', '3', '3', '2.50'], ['cookies', '10', '5', '0.75']]
  14.  
  15. end first while loop [['fuji apples', '2', '8', '1.50'], ['peanut butter', '3', '5', '1.75'], ['bananas', '2', '1', '2.00'], ['potato chips', '3', '3', '2.50'], ['cookies', '10', '5', '0.75']]
  16.  
  17. start first while loop [['fuji apples', '2', '8', '1.50'], ['peanut butter', '3', '5', '1.75'], ['bananas', '2', '1', '2.00'], ['potato chips', '3', '3', '2.50'], ['cookies', '10', '5', '0.75']]
  18.  
  19. end first while loop [['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['peanut butter', '3', '5', '1.75'], ['potato chips', '3', '3', '2.50'], ['cookies', '10', '5', '0.75']]
  20.  
  21. end first while loop [['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['peanut butter', '3', '5', '1.75'], ['potato chips', '3', '3', '2.50'], ['cookies', '10', '5', '0.75']]
  22.  
  23. start first while loop [['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['peanut butter', '3', '5', '1.75'], ['potato chips', '3', '3', '2.50'], ['cookies', '10', '5', '0.75']]
  24.  
  25. start first while loop [['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['peanut butter', '3', '5', '1.75'], ['potato chips', '3', '3', '2.50'], ['potato chips', '3', '3', '2.50']]
  26.  
  27. start first while loop [['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['peanut butter', '3', '5', '1.75'], ['peanut butter', '3', '5', '1.75'], ['potato chips', '3', '3', '2.50']]
  28.  
  29. start first while loop [['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['bananas', '2', '1', '2.00'], ['peanut butter', '3', '5', '1.75'], ['potato chips', '3', '3', '2.50']]
  30.  
  31. start odd while loop [['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['bananas', '2', '1', '2.00'], ['peanut butter', '3', '5', '1.75'], ['potato
  32. chips', '3', '3', '2.50']]
  33.  
  34. end odd while loop [['fuji apples', '2', '8', '1.50'], ['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['peanut butter', '3', '5', '1.75'], ['potato chips', '3', '3', '2.50']]
  35.  
  36. end first while loop [['potato chips', '3', '3', '2.50'], ['fuji apples', '2', '8', '1.50'], ['bananas', '2', '1', '2.00'], ['peanut butter', '3', '5', '1.75'], ['cookies', '10', '5', '0.75']]
  37.  
  38. Potato Chips Aisle 3 Location 3 + 2.50 = 2.50
  39. Fuji Apples Aisle 2 Location 8 + 1.50 = 4.00
  40. Bananas Aisle 2 Location 1 + 2.00 = 6.00
  41. Peanut Butter Aisle 3 Location 5 + 1.75 = 7.75
  42. Cookies Aisle 10 Location 5 + 0.75 = 8.50
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement