Bytephilosopher(Yostina)
213 subscribers
26 photos
1 video
10 links
👋🏾 Hey, I'm Yostina — a curious mind exploring tech, AI, and social change.
From machine learning to full-stack dev
Download Telegram
#August_14_LeetCode_Grind

🚀 DSA Bite: Queues & Stacks 📚

📌 Stack → Last In, First Out (LIFO)
👉 Example: Stack of plates – last plate on top comes off first.
🔹 Operations: push(), pop(), peek()

📌 Queue → First In, First Out (FIFO)
👉 Example: People in a line – first person in line gets served first.
🔹 Operations: enqueue(), dequeue(), front()

💡 Tip:

Stack → Use when you need to reverse or backtrack (undo, DFS).

Queue → Use when you need order processing (printer queue, BFS).


@byte_philosopher
🔥4