Data Structures · ডেটা স্ট্রাকচার


Stacks and Queuesস্ট্যাক এবং কিউ

Stacks and queues are the two most fundamental linear data structures in computer science after the plain array and linked list. They are not new ways of storing data so much as new rules of discipline about the order in which data may enter and leave. A stack enforces LIFO (Last In, First Out); a queue enforces FIFO (First In, First Out). Almost every real system you touch — the "Back" button in a browser, the undo history in an editor, the print spooler, the CPU scheduler, function calls in every programming language — is built on one of these two ideas.

For BCS, Bank IT, and IT-officer written and MCQ exams this topic is a guaranteed scorer. Questions are usually short and decisive: "Which principle does a stack follow?", "What data structure is used in function call management?", "Convert this infix expression to postfix", "After these push/pop operations, what is on top?". If you master the rules and can trace operations by hand, you will not miss a single mark here.

Learning objectives

  • Define a stack and a queue precisely and state the principle each follows (LIFO vs FIFO).
  • Name and perform every core operation (push, pop, peek, enqueue, dequeue, front, rear) and know their time complexity.
  • Understand overflow and underflow conditions and how top/front/rear pointers move.
  • Distinguish the main queue variants: simple (linear) queue, circular queue, priority queue, and deque.
  • Implement both structures conceptually using arrays and using linked lists, and compare the two.
  • Apply stacks to classic problems: expression conversion (infix→postfix), expression evaluation, balanced-parentheses checking, function-call/recursion management.
  • Apply queues to scheduling, buffering, and breadth-first traversal.
  • Trace operations by hand and answer exam MCQs quickly and correctly.

Continue this lesson free: create an account

You have read the opening of this lesson. The full lesson (2,970 words, in English and Bangla) has worked examples, practice questions with answers and exam tips. A free account opens it and saves your progress.পুরো পাঠটি পড়তে বিনামূল্যে অ্যাকাউন্ট খুলুন।

More on this subject: Data Structures guide: syllabus by chapter and past questions

© 2026 ARBS Academy (Aether Brains). Questions' explanations, model answers and lessons are our original work; copying or republishing is not allowed.

© ২০২৬ এআরবিএস একাডেমি (Aether Brains)। প্রশ্নের ব্যাখ্যা, মডেল উত্তর ও লেসন আমাদের নিজস্ব কাজ; কপি বা পুনঃপ্রকাশ করা নিষেধ।