---
# System prepended metadata

title: Data Structures and Algorithms

---



---

## Data Structures and Algorithms – My Understanding

We’ve been learning about **Data Structures and Algorithms (DSA)**, and honestly, it’s starting to make more sense. It helps us write better and smarter code.

---

### 🔹 What is a Data Structure?

A data structure is just a way to store and arrange data so we can use it easily.
Different data needs different ways to be organized.

---

### 🔹 What is an Algorithm?

An algorithm is a step-by-step way of solving a problem. It’s like giving your code instructions to follow.

---

##  Stack and Queue (What We Focused On)

### ✅ Stack

* Stack means **Last In, First Out (LIFO)**.
* Think of a stack of books: the last one you put is the first one you remove.
* We use `push()` to add, and `pop()` to remove.

**Where it’s used:** undo button, browser history, etc.

---

### ✅ Queue

* Queue means **First In, First Out (FIFO)**.
* Like a line of people — first person goes first.
* We use `enqueue()` to add and `dequeue()` or `shift()` to remove.

**Where it’s used:** print queues, messaging apps, etc.

---

## ✅  Why DSA Matters

It helps us write code that runs faster and solves problems better.
It’s also important when preparing for job interviews.

---

## ✅ My Final Thoughts

I’m still learning, but Stack and Queue are the two I understand the most for now.
I’ll keep practicing till the rest becomes easier.

---
