https://github.com/monciego/dsa
Data Structures and Algorithms
https://github.com/monciego/dsa
Last synced: about 21 hours ago
JSON representation
Data Structures and Algorithms
- Host: GitHub
- URL: https://github.com/monciego/dsa
- Owner: monciego
- Created: 2023-07-22T17:32:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T11:52:57.000Z (almost 2 years ago)
- Last Synced: 2025-05-18T00:08:06.573Z (about 1 month ago)
- Language: Java
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Data Structures and Algorithms
**Data Structures** - a named location that can be used to store and organize data.
**Algorithm** - a collection of steps to solve a problem.---
**Data Structures**
- **Stacks 📚**
- Last In First Out (LIFO) data structure.
- Stores objects into a sort of "vertical tower"
- push() to add to the top
- pop() to remove to from the top**Uses of stacks?**
1. Undo/Redo features in text editors.
2. Moving back/forward through browser history.
3. Backtracking algorithms (maze, file directories)
4. Calling functions (call stack)- **Queues 🎟️**
- First In First Out (FIFO) data structure (ex. a line of people)
- A collection designed for holding elements prior to processing linear data structure
- add = enqueue, offer()
- remove = dequeue, poll()
- examine = element(), peek()**Uses of queues?**
1. Keyboard buffer (letters should appear on the screen in order they're pressed)
2. Printer Queue (print jobs should be completed in order)
3. Used in Linkedlists, PriorityQueues, Breadth-first search- **Priority Queues 🎟️**
- First In First Out (FIFO) data structure that serves elements with the highest priorities first before elements with lower priority
---
> We learn Data Structures and Algorithms to write code that is both time and memory efficent.