You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shuffle command uses the Fisher-Yates shuffle algorithm to
randomize the order of elements in a queue.
The do_shuffle function handles command execution,
ensuring no arguments are provided and invoking q_shuffle on the current
queue with proper error checking and display via q_show.
The q_shuffle function iterates through the list from tail to head,
swapping nodes at random indices selected via rand() from the
remaining dis-shuffled portion.
Change-Id: Iee0e1c3c650554ed5d5cf79f03012fa7339eb343
0 commit comments