Ericsson Interview Question

Implement first in first out without using queue datastructure