SAP Interview Question

It was a Stack and queue question