Sorting Animation using Multi-threading

Write a multi-threading animation program for selection sort, insertion sort, and bubble sort using JavaFx GUI. Some sample outputs of the program is shown below. Create an array of integers 1,2,…,30 and shuffle the elements of the array randomly. Create a pane to display the array in a histogram. You should invoke each sorting method in a separate thread. Each algorithm uses two nested loops. When the algorithm completes an iteration in the outer loop, put the thread to sleep for 0.8 seconds, and re-display the array in the histogram, color the last bar in the sorted sub-array.

This question has been answered.

Get Answer