IBM interview question

Array questions - Largest next building and sorting