Own Company interview question

sorting, searching and logic puzzle