Yandex interview question

Algorithm questions, binary search time and space complexity