This is a collection of solutions to programming problems, hacks, gotachas, data structures, algorithims, etc...
Currently the only programming language I am using is Java, I am hoping to have the time to add similar implementations in other programming languages for comparison.
-
- Iterative Solution [time complexity = O(n^2), space complexity = O(1)]
- A HashMap-backed solution with a single iteration [time complexity = O(n), space complexity = O(n)]
- A HashMap-backed solution with a dual iteration [time complexity = O(n), space complexity = O(n)]
TODO:
- make sure that we are testing the worst case scenario for the HashMap-backed solution []