Added equality and output for stack and queue