data structures implemented in go
Where have you seen ๐๐ฎ๐๐ฎ ๐ฆ๐๐ฟ๐๐ฐ๐๐๐ฟ๐ฒ๐ in ๐ฟ๐ฒ๐ฎ๐น ๐๐ถ๐บ๐ฒ ๐๐ฝ๐ฝ๐น๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป๐ ?
๐๐ญ๐๐๐ค:
- UNDO option
- Text editor: you push letter by letter to the stack so you erase back.
- Recursion(inbuilt stack)
๐๐ฎ๐๐ฎ๐:
- Your browser deletes the history past one month.
- If you delete a picture on your phone, it will be the "recently delete" folder which says "the images will be deleted permanently after one week". Here all the images are stored in the queue so it's easier to pop from the rear based on the image deletion date.
- Waiting list: during online registrations, sometimes you'll be put on the waiting list. basically, all the requests will be stored in the queue.
๐๐ข๐ง๐ค๐๐ ๐ฅ๐ข๐ฌ๐ญ:
- Browser's Next and Previous Button: a linked list of URLs
- music player where you can play the next or previous song. (Doubly linked list).
- In the ludo game, It has to pass the chance to each player in a circular fashion (circular linked list).
๐๐ซ๐๐๐ฌ:
- File system: Folders and subfolders (N-ary tree).
- e-commerce websites : category -> subcategories -> products
- Auto-suggestion when you google (Trie)
๐๐ซ๐๐ฉ๐ก๐ฌ:
- Uber, Ola cab booking: show nearest available cars (BFS)
- Maven dependencies build order ( Topological sorting (DFS))
- While booking bus/flights, you get a list of available routes.
- In Facebook, users are considered to be the vertices and if they are friends then there is an edge running between them. Facebookโs Friend suggestion algorithm uses graph theory. Facebook is an example of an undirected graph.