linear search animation Write a program that animates the linear search algorithm Create a list tha

preview_player
Показать описание
linear search animation) Write a program that animates the linear search algorithm. Create a list that consists of 20 distinct numbers from 1 to 20 in a random order. The elements are displayed in a histogram, as shown in Figure
You need to enter a search key in the text field. Clicking the Step button causes the program to perform one comparison in the algorithm and repaints the histogram with a bar indicating the search position. When the algorithm is finished, display a dialog box to inform the user. Clicking the Reset button creates a new random list for a new start.
Рекомендации по теме