use array as a stack
user array as a queue