Back to curriculum

Course section

Linear Data Structures

Store and process ordered data with arrays, strings, linked structures, stacks, queues, and hash tables.

9 topics
01

Arrays & Vectors

Arrays store same-type elements in contiguous memory, enabling constant-time indexing and cache-friendly traversal.

ComplexityC++ implementation Worked trace
02

Strings & Processing

C++ strings are dynamic character sequences with safe size tracking and rich search, comparison, and transformation operations.

ComplexityC++ implementation
03

Singly Linked List

Each node stores a value and a pointer to the next node. Lists avoid shifting elements but sacrifice random access.

ComplexityC++ implementation Worked trace
04

Doubly Linked List

Doubly linked nodes keep both next and previous links, allowing bidirectional traversal and constant-time removal of a known node.

ComplexityC++ implementation
05

Circular Linked List

The last node links back to the first, making circular lists natural for repeated cyclic processing and round-robin scheduling.

ComplexityC++ implementation
06

Stacks

A stack is a LIFO abstract data type used for recursion, parsing, undo systems, expression evaluation, and depth-first search.

ComplexityC++ implementation Worked trace Visual lab
07

Queues & Deques

Queues process data FIFO. Circular arrays prevent wasted capacity, while deques permit operations at both ends.

ComplexityC++ implementation Worked trace Visual lab
08

Hash Tables

Hash tables map keys to buckets, giving expected constant-time lookup when hashing and load-factor management distribute keys well.

ComplexityC++ implementation Worked trace
09

Choosing a Data Structure

The right structure follows from the dominant operations, ordering requirements, memory limits, input scale, and correctness constraints.