Skip to main content

Section 07 · Stage 2: Master DSA

Coding Challenges

Coding problems for every topic taught in Stage 2, in the same order and graded easy, medium and hard, with test cases, step-by-step hints and model solutions.

What you will be able to do

  • Solve easy, medium and hard problems on every Stage 2 topic on your own
  • Read judge-style input and print exactly the expected output in Java
  • Check your code against edge cases and large values
  • Use hints to get unstuck and learn from model solutions and common mistakes

What you will learn

  1. 7.1Array & String Challenges12 lessons
  2. 7.2Two Pointer Challenges12 lessons
  3. 7.3Sliding Window Challenges12 lessons
  4. 7.4Prefix Sum & Hashing Challenges12 lessons
  5. 7.5Binary Search Challenges12 lessons
  6. 7.6Recursion Challenges9 lessons
  7. 7.7Backtracking Challenges9 lessons
  8. 7.8Bit Manipulation & Math Challenges9 lessons
  9. 7.9Mixed Pattern Challenges12 lessons
  10. 7.10Linked List Challenges9 lessons
  11. 7.11Stack & Queue Challenges9 lessons
  12. 7.12Hash Table Challenges3 lessons

    Building and using your own hash map. Practice for 6.3 Hash Tables from Scratch.

    1. Phone book with put, get and remove30 min
    2. First unique visitor30 min
    3. Duplicate files by content30 min
  13. 7.13Sorting Challenges9 lessons
  14. 7.14Binary Tree Challenges12 lessons
  15. 7.15BST Challenges9 lessons
  16. 7.16Heap & Trie Challenges9 lessons
  17. 7.17Graph Traversal Challenges12 lessons
  18. 7.18Graph Algorithm Challenges9 lessons
  19. 7.19Advanced Graph Challenges3 lessons

    Negative weights, all-pairs distances and critical links. Practice for 6.10 Advanced Graph Algorithms.

    1. Cheapest flight within k stops45 min
    2. Distances between all cities45 min
    3. Critical network links45 min
  20. 7.20Greedy & Interval Challenges9 lessons
  21. 7.211D DP Challenges12 lessons
  22. 7.222D DP Challenges9 lessons
  23. 7.23Advanced DP Challenges3 lessons

    Interval, bitmask and tree DP. Practice for 6.14 Advanced Dynamic Programming.

    1. Burst balloons for the most coins45 min
    2. Assign tasks with bitmasks45 min
    3. Rob houses on a tree45 min
  24. 7.24String Algorithm Challenges3 lessons

    Fast pattern matching and palindromes. Practice for 6.15 String Algorithms.

    1. Find a pattern in a long text45 min
    2. Repeated substring check45 min
    3. Longest palindromic substring45 min
  25. 7.25Advanced Data Structure Challenges3 lessons

    Range queries with updates and designing structures. Practice for 6.16 Advanced Data Structures.

    1. Range totals with updates45 min
    2. Range minimum queries45 min
    3. Count smaller scores after each45 min
  26. 7.26Mixed DSA Challenges12 lessons