OpenText interview question

Algorithmic questions similar to the one's found in Hackerrank and CodeChef