added stack as array and queue as js