Posts

Showing posts from December 12, 2018

Can I reverse a queue without using stack?

Image
up vote 1 down vote favorite I have a queue with some numbers for example 5,6,7,8 is in queue, 5 is q->front and 8 is q->rear.. Can I reverse them in queue but without using stacks? algorithm stack queue reverse share | improve this question edited Dec 16 '17 at 13:11 asked Dec 14 '17 at 23:42 Orkhan Salahov 19 4