Krpex
Create account
Data structures & algorithmsintermediate

DSA for Placements

The data structures and algorithms asked in campus placements and coding rounds, with the patterns to solve new problems.

Lessons
19 lessons in 5 modules
Study time
about 10 hours
Duration
~8 weeks at your own pace

Free plan: counts as one of your 2 new courses this month. Plans

What you'll learn

  • Analyse time and space complexity with Big-O
  • Solve array, string, linked list, stack and queue problems
  • Use trees, graphs, recursion and dynamic programming patterns
  • Approach an unseen interview problem step by step

Syllabus

  1. Module 1FoundationsHow to measure and approach problems.3 lessons
    1. Big-O: time and space complexityEstimate the complexity of loops and nested loops.30 min
    2. How to approach a coding problemUse a repeatable method: understand, examples, brute force, optimise, test.30 min
    3. Recursion basicsWrite recursive solutions and trace the call stack.30 min
  2. Module 2Arrays and stringsThe most common interview topics.5 lessons
    1. Two pointersSolve pair and partition problems with two pointers.30 min
    2. Sliding windowSolve subarray and substring problems in linear time.30 min
    3. Hashing with maps and setsUse hash maps to count, group and look up in O(1).30 min
    4. Prefix sums and sorting tricksAnswer range queries and simplify problems by sorting.30 min
    5. Binary search and its variationsApply binary search to sorted arrays and answer spaces.30 min
  3. Module 3Linear data structuresLinked lists, stacks and queues.3 lessons
    1. Linked listsReverse, merge and detect cycles in linked lists.30 min
    2. Stacks and monotonic stacksSolve bracket matching and next-greater-element problems.30 min
    3. Queues, deques and heapsUse queues and priority queues for scheduling and top-k problems.30 min
  4. Module 4Trees and graphsNon-linear structures and traversals.4 lessons
    1. Binary trees and traversalsTraverse trees in pre-, in-, post- and level order.30 min
    2. Binary search treesInsert, search and validate a BST.30 min
    3. Graphs: BFS and DFSRepresent graphs and explore them with BFS and DFS.30 min
    4. Shortest paths and topological sortApply Dijkstra's algorithm and topological ordering.30 min
  5. Module 5Dynamic programming and greedyOptimisation patterns.4 lessons
    1. From recursion to memoisationTurn an exponential recursive solution into DP.30 min
    2. Classic 1D and 2D DP problemsSolve knapsack, LCS and grid path problems.30 min
    3. Greedy algorithmsRecognise when a greedy choice is safe and prove it informally.30 min
    4. Mock interview roundSolve two timed problems and explain your approach aloud.45 min