Tesla interview question

Implement cache and stack using c/c++