Question d’entretien chez Vymo

Q2 – Let’s say we have an queue and any index is given by user for that queue. Reverse all the elements in that queue before that index by using only queue. Ex – 1 2 3 4 5 6 7 8 Index = 4 Output : 5 4 3 2 1 6 7 8

Réponse à la question d'entretien

Utilisateur anonyme

1 avr. 2019

Use two queue and implement stack