Micromine interview question

wrote the complexity of a algorithm