Make algorithm code production-ready | Google Interview Question