Two Pointers and Sliding Window
Two techniques that turn a nested loop into a single pass. Two pointers move towards each other; a sliding window grows and shrinks over a range.
A complete core Python path: syntax, data types, operators, strings, control flow, collections, functions, exceptions, files, modules, the standard library, OOP, iterators, generators, decorators, internals, concurrency, regular expressions, testing, typing, performance, security, problem solving, projects, interview preparation and exams.
110 notes in 33 topics
Two techniques that turn a nested loop into a single pass. Two pointers move towards each other; a sliding window grows and shrinks over a range.
A tree is a graph with no cycles and one root. Both are walked with the same two strategies - depth first with a stack, breadth first with a queue.