# sorting easy

Biggest to the Back

The heaviest pumpkin rides at the back of the wagon so it doesn't squash the others. πŸŽƒ

You get a list of nums (at least one). Swap the biggest value to the LAST position and print the list, comma-separated. (If there's a tie, move the first biggest.)

Example:

Input: nums = [4, 9, 2, 5] Output: 4,5,2,9

The biggest value is 9, sitting at index 1 β€” swap it with the last position (index 3), giving [4, 5, 2, 9].

πŸ’‘ need a hint?

sort-biggest-back.pyπŸ”’ given lines are locked β€” write your code in between
loading...