Optiver Interview Question

2 OOPs based question one was on queue and other on stacks