Visualized DSA Strategies

Episode 0 The Visual Dictionary

7 min · Python

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 Python, and what its operations cost.

What you'll learn

  • How to read pointers, windows and the four highlight colours
  • Lists, strs, [0] * 26 counters and lists of lists, and why indexing is O(1)
  • dict vs set: key → value vs membership only
  • Stacks, queues and deques: a list as a stack, collections.deque, and which end you can touch
  • Linked lists and heaps (heapq), and what makes them different

Chapters

  1. 0:00Intro
  2. 0:18How to read the pictures
  3. 0:59Variable
  4. 1:20Array: list
  5. 1:51String: str
  6. 2:24Counter: [0] * 26
  7. 3:01Matrix: list of lists
  8. 3:36Hash map: dict
  9. 4:14Hash set: set
  10. 4:50Stack: list
  11. 5:18Queue and deque: collections.deque
  12. 5:48Linked list
  13. 6:22Heap (heapq)
  14. 7:00The whole dictionary