Agilisium interview question

data structure and algorithms mainly