Hitachi Vantara interview question

Data structure and algorithms, pseudocode