+ 1
Queue structure
Is it necessary to add elements at the end of the queue? What if I add elements at the beginning and delete from the end ? it's not a queue anymore?
2 Respostas
0
if you add elements at the beginning it is also a FIFO structure
0
i mean that it depends on how one defines a queue. if you add nodes at the first node and delete them from the end node, this is also a FIFO structure. the difference is that the elements are reversed when one prints them. thx.