Google Interview Question

Time and Space complexity ?