Angara Interview Question

Time Complexity of Above Question