Hitachi Vantara Interview Question

Data structure and algorithms, pseudocode