use a single array to implement three stacks
a function min which returns the minimum element