Fraction to Recurring Decimal — Remainder Tracking HashMap
Convert a fraction to decimal string with recurring part detected via remainder position tracking.
webcoderspeed.com
9 articles
Convert a fraction to decimal string with recurring part detected via remainder position tracking.
Add two numbers represented as reversed linked lists by simulating digit addition with carry propagation.
Add two numbers given in forward order by pushing digits to stacks, then building the result list in reverse.
Simulate a baseball scoring game using a stack to track valid scores and handle +, D, and C operations.
Track the minimum number of operations to return to the main folder by simulating directory navigation with a depth counter.
Simulate asteroid collisions using a stack where right-moving asteroids wait and left-moving ones destroy smaller ones.
Full company-specific mock sessions. Each simulation replicates the actual interview format, problem difficulty distribution, and evaluation criteria of Google, Meta, and Amazon.
Simulate a snake game on a grid where the snake eats food to grow and dies if it hits walls or itself. Uses a deque for O(1) head/tail and a set for O(1) body collision checks.
Design a parking system with big, medium, and small spaces. O(1) addCar checks if space is available and decrements the counter, returning whether the car was parked.