using a single array to hold 3 stacks
implmented min in stacks that maintains o(1)