Visualized DSA Strategies

Episode 0 The Visual Dictionary

9 min · PHP

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, maps, sets, stacks, queues, linked lists and heaps. For each one you'll see what the shape means, how to write it in PHP, where one array plays list, map and set, and what its operations cost.

What you'll learn

  • How to read pointers, windows and the four highlight colours
  • Arrays, strings, 26-slot counters and arrays of arrays, and why indexing is O(1)
  • One array, three jobs: a list, a key → value map, and a set of keys with isset
  • Stacks, queues and deques: plain arrays, SplDoublyLinkedList, and which end you can touch
  • Linked lists and heaps (SplMinHeap), and what makes them different

Chapters

  1. 0:00Intro
  2. 0:18How to read the pictures
  3. 0:59Variable
  4. 1:34Array
  5. 2:13String
  6. 3:03Counter: 26 slots
  7. 3:45Matrix
  8. 4:28Map: array keys
  9. 5:13Set: array keys
  10. 5:57Stack
  11. 6:30Queue and deque
  12. 7:09Linked list
  13. 7:43Heap (SplMinHeap)
  14. 8:25The whole dictionary