Real Life use of Data structures and Algorithms

Real Life use of Data structures and Algorithms

187Reads
7 December, 2022

A Small guide on Real-time use and applications of Data structures and Algorithms.

𝐒𝐭𝐚𝐜𝐤:

1) Undo and Redo choice

2) Text editor: To go back, push each letter to the stack one at a time.

3) Recursion(inbuilt stack)

𝐓𝐫𝐞𝐞𝐬:

1) Folders and subfolders in the file system (N-ary tree).

2) Online stores: categories, subcategories, and items

3) Google's automatic suggestion feature (Trie)

𝐐𝐮𝐞𝐮𝐞:

1) Your browser deletes the history past one month.

2) If you delete a picture from your phone, it will be placed in the "recently deleted" folder, which states that "the images will be completely erased after one week." All photographs are placed in the queue here, making it easy to pop from the back based on the image deletion date.

3) You may occasionally be added to the waiting list during online registration. In essence, the queue will hold all of the requests.

𝐆𝐫𝐚𝐩𝐡𝐬:

1) When booking an Uber or Ola cab, display the closest vehicles (BFS)

2) Topological sorting (DFS) is the build order for Maven dependencies.

3) You are given a list of available routes when you purchase a bus or flight.

4) In Facebook, users are referred to as vertices, and if two users are friends, an edge connects them. Graph theory is used in Facebook's friend suggestion algorithm. An example of an undirected graph is Facebook.

𝐋𝐢𝐧𝐤𝐞𝐝 𝐥𝐢𝐬𝐭:

1) Browser's Next and Previous Button uses a linked list of URLs

2) A music player that allows you to play the previous or next tune. (Doubly linked list).

3) In the game of Ludo, the chance must be passed around in a circular motion to each player (circular linked list).