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