A random collection of interview coding problems I've encountered along my journey as a software developer. Solutions are coded in Java 17.
Most Solution.java classes come with a corresponding set of unit tests.
Using JUnit 5 along with AssertJ
library for its convenient and fluent assertions. Test method names follow naming standard as
outlined here.
| Problem | Solution |
|---|---|
| Subarray Sum Equals K | Solution - Unit Test |
| Product of Array Except Self | Solution - Unit Test |
| Power Function | Solution - Unit Test |
| Recursive Multiply | Solution - Unit Test |
| Array Index Equal Value | Solution - Unit Test |
| Rotate Square Clockwise | Solution - Unit Test |
| Sum Binary Strings | Solution - Unit Test |
| Braces Validator | Solution - Unit Test |
| AP Missing Element | Solution - Unit Test |
| Linked List Reversal | |
| Sentence Permutations | |
| Bliffoscope |
| Problem | Solution |
|---|---|
| Symmetric Tree | Solution - Unit Test |
| DFS Pre-Order (NLR) | Solution - Unit Test |
| DFS Post-Order (LRN) | Solution - Unit Test |
| DFS In-Order (LNR) | Solution - Unit Test |
| DFS Reverse Pre-Order (NRL) | |
| DFS Reverse Post-Order (RLN) | |
| DFS Reverse In-Order (RNL) |