Algorithm Visualizer
Algorithm Visualizer
Ashutosh Koli
Vishwakarma Institute of Technology, Pune
Savitribai Phule Pune University, Maharashtra, India.
ashutoshkoli24@gmail.com
Algorithms are hard to understand for computer science students because they dynamically modify values of elements of abstract data structures. In this project sequence of execution of algorithms is explained visually. It helps to realize the fundamental concepts of algorithms such as searching and sorting method in simple manner. Animations can help to understand algorithms, since they connect abstract concepts to real life objects and situations Algorithm Visualizer illustrates how algorithms works. It mainly aims to simplify and deepen the understanding of algorithms operation. Within the paper we discuss the possibility of enriching the standard methods of teaching algorithms, with the algorithm visualizations. As a step in this direction, we introduce the Algorithm visualizer platform, present our practical experiences and describe possible future directions, based on our experiences.
SEARCHING
Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is stored. Based on the type of search operation, these algorithms are generally classified into two categories:
Sequential Search: In this, the list or array is traversed sequentially and every element is checked. For example: Linear Search.
Fig: Linear Search Visualization
Interval Search: These algorithms are specifically designed for searching in sorted data-structures. These type of searching algorithms are much more efficient than Linear Search as they repeatedly target the center of the search structure and divide the search space in half. For Example: Binary Search.
Fig: Binary Search Visualization
SORTING
Sorting refers to arranging data in a particular format. Sorting algorithm specifies the way to arrange data in a particular order. Most common orders are in numerical or lexicographical order.
The importance of sorting lies in the fact that data searching can be optimized to a very high level, if data is stored in a sorted manner. Sorting is also used to represent data in more readable formats. Following is some of the examples of sorting in real-life scenarios.
Telephone Directory − The telephone directory stores the telephone numbers of people sorted by their names, so that the names can be searched easily.
Dictionary − The dictionary stores words in an alphabetical order so that searching of any word becomes easy.
In-place Sorting and Not-in-place Sorting
Sorting algorithms may require some extra space for comparison and temporary storage of few data elements. These algorithms do not require any extra space and sorting is said to happen in-place, or for example, within the array itself. This is called in-place sorting. Bubble sort is an example of in-place sorting.
Fig: Bubble Sort Visualization
However, in some sorting algorithms, the program requires space which is more than or equal to the elements being sorted. Sorting which uses equal or more space is called not-in-place sorting. Merge-sort is an example of not-in-place sorting.
Fig: Merge Sort Visualization
Stable and Not Stable Sorting
If a sorting algorithm, after sorting the contents, does not change the sequence of similar content in which they appear, it is called stable sorting.
If a sorting algorithm, after sorting the contents, changes the sequence of similar content in which they appear, it is called unstable sorting.
Stability of an algorithm matters when we wish to maintain the sequence of original elements, like in a tuple for example.
Adaptive and Non-Adaptive Sorting Algorithm
A sorting algorithm is said to be adaptive, if it takes advantage of already 'sorted' elements in the list that is to be sorted. That is, while sorting if the source list has some element already sorted, adaptive algorithms will take this into account and will try not to re-order them.
A non-adaptive algorithm is one which does not take into account the elements which are already sorted. They try to force every single element to be re-ordered to confirm their sortedness.
CONCLUSION
The proposed system provides complete animation of common Searching and Sorting Algorithms. Ultimately, the application proposed gives a clear understanding of the subjects and complements conventional learning of the student. To enable user participation, we are constructing modules that will let students make their own algorithm visualizations. We aim to decrease the fear in the minds of students regarding Searching and Sorting algorithms and make it fun and engaging.




Well done Great going 👍🏻
ReplyDeleteEasy to understand and informative keep it up
ReplyDeleteVery good ashutosh keep growing...
ReplyDeletegreat but one thing ,you should add Time and Space complexity points.
ReplyDeleteThank you for your suggestion. I will definitely consider your suggestion and will make changes accordingly.
Delete