Basic Concepts, Stacks and Queues
Official syllabus text (word for word)
Basic Concepts of Data Structures — Definitions; Data Abstraction; Performance Analysis - Time & Space Complexity, Asymptotic Notations; Polynomial representation using Arrays, Sparse matrix (Tuple representation); Stacks and Queues - Stacks, Multi-Stacks, Queues, Circular Queues, Double Ended Queues; Evaluation of Expressions - Infix to Postfix, Evaluating Postfix Expressions.
- 1Data structures: definitions and classification
What a data structure is, and the family tree you need for every "classify data structures" question.
lesson live - 2Data abstraction and ADTs
Abstract data types separate WHAT a structure does from HOW it is built — plus the five properties every algorithm must have.
lesson live - 3Performance analysis: time and space complexity
Measure an algorithm without a stopwatch: space S(P) = c + Sp, step counts, and the loop tricks KTU asks every single time.
lesson liveasked 5× - 4Asymptotic notations
Big-O, Omega and Theta — the ceiling, the floor and the sandwich — with proofs you can write in 3 lines.
lesson liveasked 2× - 5Polynomial representation using arrays
Store a polynomial as (coefficient, exponent) pairs and add two of them in one merge-like pass.
lesson livevisualizerC code - 6Sparse matrix — tuple representation
Most entries zero? Store only (row, col, value) triples — and transpose them fast.
lesson livevisualizerC codeasked 1× - 7Array storage: row-major and column-majorbonus
How a 2-D array is laid out in 1-D memory — and the address formulas that turn into easy marks.
lesson liveasked 1× - 8Stack ADT and array implementation
A last-in, first-out list where every insertion and deletion happens at one end, the top.
lesson livevisualizerC codeasked 2× - 9Multiple stacks in one array
Fit two (or n) stacks into one array without wasting space.
lesson live - 10Queue ADT (linear queue)
A first-in, first-out list: insert at the rear, delete from the front.
lesson livevisualizerC codeasked 1× - 11Circular queues
A queue whose array wraps around, so slots freed at the front can be reused.
lesson livevisualizerC codeasked 2× - 12Double-ended queues
A double-ended queue: insert and delete at both the front and the rear.
lesson livevisualizerC codeasked 4× - 13Infix to postfix conversion
Use an operator stack to rewrite an infix expression so that operators follow their operands.
lesson livevisualizerC codeasked 3× - 14Evaluating postfix expressions
Evaluate a postfix expression in one pass with a stack of operands.
lesson livevisualizerC codeasked 2×