Tag: stack
4 posts
-
Data Structures for Beginners: Arrays, Lists, Stacks, Queues, Trees and Graphs Compared
An introduction to data structures: arrays, linked lists, stacks, queues, trees and graphs, their time complexities, and how to pick one for a real problem.
-
C++ stack, queue and priority_queue: How the Adapters Work and the Mistakes They Invite
std::stack, std::queue and std::priority_queue explained: why pop() returns void, choosing the underlying container, min-heaps and custom comparators, Dijkstra, BFS bugs, and thread safety.
-
Stack vs Heap in C++: Why Deep Recursion and Big Locals Overflow, and When to Allocate
C++ stack vs heap: stack overflow from deep recursion and huge locals, memory layout, performance, new/delete, smart pointer lead-in—Valgrind.
-
Stacks and Queues in Interviews: LIFO/FIFO Patterns, Monotonic Stacks and Deques
Stacks and queues for coding interviews: LIFO and FIFO behavior, the problem patterns they solve (bracket matching, BFS, monotonic stacks), and the mistakes that cost points.