Greedy Algorithms8 sections · 316 units
Open in Course

Section Recap

What we learned

You have learned advanced greedy:

1.1. Huffman coding: : Merge smallest frequencies first using min-heap.

2.2. Reorganize string: : Place most frequent characters first using max-heap.

3.3. Remove K digits: : Use stack to maintain increasing order from left. Good job on finishing this section. You now have a complete greedy toolkit. You also saw:

4.4. Remove K digits: : Pop larger digits when smaller ones arrive.

5.5. Create maximum number: : Split, extract, merge with lexicographic comparison.

6.6. Patching array: : Extend range by doubling with patches. These patterns appear in many coding interviews.