Luxoft interview question

Complexity, big O notation