- Home
- Courses
- DSA for Interviews
- Foundations and Linear Structures
Micro Free Course — 100% Free Learning
All lessons in this module are free to learn. Sign in with Google to save your progress.
Foundations and Linear Structures
Big-O analysis (time and space complexity); arrays and strings with two pointers and sliding window patterns; hashmaps and sets for lookup problems; stacks, queues, and monotonic stack patterns.
Module Content
Big-O & Complexity Analysis
The vocabulary interviewers use. Master O(1), O(log N), O(N), O(N log N), O(N²) and how to recognize each from code. FIND_VIDEO: search 'big O notation time complexity explained' — recommended channel: HackerRank / freeCodeCamp. Aim for 10 min or under.
Recap — Reading Time and Space Complexity
How to look at code and immediately classify it. Plus the space cost of recursion and the common analysis traps.
Arrays & Strings: Two Pointers and Sliding Window
Two of the highest-yielding interview patterns. Recognize them and you'll solve a third of all array/string problems with O(N) algorithms. FIND_VIDEO: search 'two pointers sliding window pattern leetcode' — recommended channel: NeetCode / Tushar Roy. Aim for 12 min or under.
Recap — Two Pointers and Sliding Window Patterns
When to reach for two pointers, when for sliding window, and the canonical problems each solves.
HashMaps & HashSets
The single most-used data structure in interview problems. Trade space for time; O(1) lookups unlock most solutions. FIND_VIDEO: search 'hashmap hashset interview problems' — recommended channel: NeetCode / Abdul Bari. Aim for 10 min or under.
Recap — When to Reach for a HashMap
The mental signals that scream 'hashmap'. Plus the patterns that combine hashmaps with other techniques.
Stacks, Queues & Monotonic Stack
LIFO and FIFO patterns. The monotonic stack is the secret weapon for 'next greater element' style problems. FIND_VIDEO: search 'stack queue monotonic stack interview' — recommended channel: NeetCode / Tushar Roy. Aim for 11 min or under.
Recap — Stack and Queue Patterns
When stack and queue help. The monotonic stack pattern that solves several seemingly different problems.