In this article we will see how we can make a PyQt5 application which will visualize the exponential search algorithm.
Fibonacci search technique is a method of searching a sorted array using a divide and conquer algorithm that narrows down possible locations with the aid of Fibonacci numbers. Compared to binary search where the sorted array is divided into two equal-sized parts, one of which is examined further, Fibonacci search divides the array into two parts that have sizes that are consecutive Fibonacci numbers.
GUI implementation steps :
1. Create a list of label according to the given list of numbers
2. Set their text, border, color and geometry with respective gap from each other
3. Each label height should be proportional to the value of each number
4. Create a start and pause push button to start the searching and pause the searching
5. Create a result label to show the searching status
Back end implementation steps :
1. Create label list corresponding to the given numbers
2. Create variable for the index used by Fibonacci search and flag for searching and flag for searching minimum Fibonacci number and for searching value after getting the Fibonacci number
3. Add action to the push button their action should change the flag status i.e start action should make flag true and pause action should make flag false
4. Create timer object which calls a method after every specific time
5. Inside the timer method check for the flag is flag is true begin the search of Fibonacci number
6. After finding the fibonacci number find the given number within the range
7. Show the result
Below is the implementation
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Linear Search Visualizer using PyQt5
- Interpolation Search visualizer using PyQt5
- Exponential Search Visualizer using PyQt5
- Sub Set Search Visualizer using PyQt5
- PyQt5 - Jump Search Visualizer
- PyQt5 - Binary Search Visualizer
- Bubble sort visualizer using PyGame
- Python | Plotting Fibonacci spiral fractal using Turtle
- Python | Find fibonacci series upto n using lambda
- NumPy - Fibonacci Series using Binet Formula
- Python | sympy.fibonacci() method
- Performing Google Search using Python code
- Python | Get a set of places according to search query using Google Places API
- Hyperlink Induced Topic Search (HITS) Algorithm using Networxx Module | Python
- Python | Automate Google Search using Selenium
- Voice search Wikipedia using Python
- Search String in Text using Python-Tkinter
- Search Google Using Python Selenium
- Number Guessing Game in Python using Binary Search
- Binary Search Visualization using Pygame in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.