Visier interview question

Question related to algorithm runtime