[algorithms] stacks and queues implemented