Visualized DSA Strategies

Episode 0 The Visual Dictionary

9 min · C++

Episode 0The Visual Dictionary

▶ This video is coming to YouTube soon.

Before we solve a single interview problem, we agree on a language. Every data structure in this course has one shape and one colour: arrays, strings, counters, matrices, hash maps, hash sets, stacks, queues, linked lists and heaps. For each one you'll see what the shape means, how to declare it in C++, and what its operations cost.

What you'll learn

  • How to read pointers, windows and the four highlight colours
  • Vectors, strings, 26-slot counters and 2D vectors, and why indexing is O(1)
  • unordered_map vs unordered_set: key → value vs membership only
  • Stacks, queues and deques: which end you can touch, and why pop returns nothing
  • Linked lists and heaps (priority_queue with greater), and what makes them different

Chapters

  1. 0:00Intro
  2. 0:18How to read the pictures
  3. 1:01Variable
  4. 1:26Array: vector
  5. 2:02String
  6. 2:48Counter: vector<int>(26)
  7. 3:27Matrix: vector of vectors
  8. 4:04unordered_map
  9. 4:54unordered_set
  10. 5:38Stack
  11. 6:13Queue and deque
  12. 6:51Linked list
  13. 7:27Heap (priority_queue)
  14. 8:07The whole dictionary