Math & bits line
Math & Geometry problems
Problems solved with arithmetic and careful indexing rather than a data structure: turning a grid, reading digits, raising to a power. The traps are edge cases and overflow.
- 2 easy
- 6 medium
The 8 problems
In the order the app teaches them. Each page has the problem, five hints and the explained solution.
- Rotate ImageMedium
- Spiral MatrixMedium
- Set Matrix ZeroesMedium
- Happy NumberEasy
- Plus OneEasy
- Pow(x, n)Medium
- Multiply StringsMedium
- Detect SquaresMedium
On the roadmap
Math & Geometry is a station on the math & bits line. It builds on Arrays & Hashing. Next comes Bit Manipulation.
The roadmap says why each line runs in its order.
Patterns
4 patterns solve these problems. Naming them gives the problems’ methods away, so the list is folded.
Show the 4
- Matrix traversal2 problems
- Hash set membership2 problems
- Digit-by-digit arithmetic3 problems
- Purpose-built data structure1 problem