Ericsson interview question

Implement first in first out without using queue datastructure