Ibex (Israel) Interview Question

Pseudocode question in data structure