Zalando interview question

Whats code time complexity? How can it be improved?