v0.0.1 beta-release
Coding Challenge Solutions
A minimalist space dedicated to breaking down complex data structures and competitive programming problems. High performance explanations for low-level thinking.
Recent solutions
#146LRU Cache
MediumCombine a doubly linked list for ordering with a hash map for O(1) lookups. Move accessed nodes to the front; evict from the tail.
Hash MapLinked ListDesign
#53Maximum Subarray
MediumApply Kadane's algorithm: maintain a running sum and reset it when it drops below zero. Track the global maximum throughout.
ArrayDivide and ConquerDynamic Programming
#70Climbing Stairs
EasyThe number of ways to reach step n is the sum of ways to reach steps n-1 and n-2 — essentially the Fibonacci sequence.
Dynamic ProgrammingMath
#226Invert Binary Tree
EasySwap the left and right children at every node recursively. Base case: if the node is null, return null.
TreeBFSDFS