The objective of this experiment is to introduce the concept of “shuffling” two arrays to make a larger array.
You are provided with two arrays "left" and "right" and your goal is to shuffle these two arrays to form the "result" array using the "Left" and "Right" buttons provided.
The "Left" button picks the first element from the "left" array and places it at the end of the "result" array. Similarly, the "Right" button picks the first element from the "right" array and places it at the end of the "result" array.
At any point during the experiment, the arrays can be one of the two states: sorted or unsorted. The sorted arrays will be shown in green color whereas the unsorted arrays will be shown in red color.
The shuffle operation takes two list and returns a single combined list. At each step of shuffle operation, first element from Left/Right input lists is taken arbitrarily and added to the result list.