Analyze time complexity and threading trade-offs | Imc Interview Question