IMC Trading interview question

Perform a stack using Java/C++