Loading...
Loading...
Section 05 · Stage 2: Master DSA
A repeatable way to solve problems: complexity, recursion and the common patterns behind most coding questions.
A repeatable routine for any coding question, so you never start by staring at a blank editor.
Analyse real code, not just labels, and use the input limits to know which solution will pass.
Catch wrong answers yourself before a judge does, with hand tests, a brute-force checker and a first look at JUnit.
The everyday moves that most array and string questions are built from.
Move two indexes through an array or string to replace a nested loop with one pass.
Answer questions about subarrays and substrings by growing and shrinking a window instead of checking every range.
Precompute running totals and use maps and sets to answer range and subarray questions fast.
Search sorted data in log n time, then use the same idea to search for the answer itself.
Go beyond factorial: trace recursion trees, recurse on arrays and strings, and measure the cost of recursive code.
Build answers one choice at a time and undo choices that cannot work.
Binary tricks and number theory that appear again and again in placement tests.
Mixed problems where you first decide which pattern fits, then solve and test it.