This fixes #1 as the solution is now a constant time solution.