Show the steps used by the shaker sort to sort the list 3, 5, 1, 4, 6,

Question:

Show the steps used by the shaker sort to sort the list 3, 5, 1, 4, 6, 2.
The shaker sort (or bidirectional bubble sort) successively compares pairs of adjacent elements, exchanging them if they are out of order, and alternately passing through the list from the beginning to the end and then from the end to the beginning until no exchanges are needed.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: