Surely those of you who are new to data structures are also fed up with complex, and difficult to imagine structures such as singly linked lists, pointers, binary search trees, etc., right. These structures are not too difficult, but they are new to you with abstraction difficult to imagine. So in this article, I will introduce you to a website that can help you visualize these structures with clear images using VisuAlgo.
|Join the channel Telegram belong to AnonyViet ???? Link ????|
Simulate data structure algorithms with VisuAlgo
VisuAlgo is a website that simulates the data structure algorithm like hash, tree, array and even sort as easy-to-understand illustrations. The site will give you a deeper understanding of how these algorithms work. The special feature of this site is that it comes with code for each and every debug line. This will help you understand what those lines of code will do in the algorithm. This website will be extremely useful for those of you who are learning data structures or learning about this array.
Note that VisuAlgo only demonstrates the algorithm and does not tell you the interaction between the system and the algorithm. You also need to know how code will manipulate memory, have a solid grasp of pointer theory, know how pointers are represented in memory, and a whole lot more if you want to dig into it. data structure.
To use VisuAlgo, you can follow the steps below:
Step 1: Visit the VisuAlgo website here.
Step 2: I will give an example by choosing the Binary Search Tree structure. The left panel is where you can issue commands to manipulate the data structure you choose, such as create, insert, search, delete, etc. The right panel is where the code for each operation and status is displayed. behavior of that action.
I will create a tree of 7 nodes with the Create command and press “Random”.
This is the tree that I created.
Next, I will look for the node with the value 65 in the tree and press “Go”.
The web page will display the algorithm’s path. The code of the algorithm will be displayed in the bottom right panel. I will briefly describe the algorithm, to find the node you need to find, you just need to browse from the root of the tree, if the current node is smaller than the node you need to find, recursively the tree to the left and vice versa until the node is considered. with the node to find, then stop. Due to the nature of the binary search tree, the left nodes will be smaller than the parent node and the right nodes will be larger than the parent node, so we will have the above algorithm.
In addition, as mentioned above, this site also has a debug feature. In the menu at the bottom of the screen, you can press the two outermost buttons to move forward or backward the action you just performed. The next 2 outermost buttons are to run the code line by line, you can run the code forward or backward. You just go to the web to manipulate a little bit and you will get used to it.
Hopefully VisuAlgo can help you better understand the algorithms that you learn.