Implement Queue using array | Queue - Data Structures | DSA |#100DaysOfCode | code io English

preview_player
Показать описание
Implement Queue using array
Implement a Queue using an Array. Queries in the Queue are of the following type:
(i) 1 x (a query of this type means pushing 'x' into the queue)
(ii) 2 (a query of this type means to pop element from queue and print the poped element)

Follow me on Social Media
Рекомендации по теме
Комментарии
Автор

@10:06 if both rear and front are pointing to the same index then one element is present, so there should be a option to delete that one element. but if give front == rear in pop operation, we can't able to delete that one element🤔.. so the condition should be front > rear return -1...if any mistakes, correct me!

kousikraj