NTU CSIE DSA 2014 Spring Homework 3, Stack Virtual Machine