Can stack and Queue be also a type of array. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

Can stack and Queue be also a type of array.

They seem similar are they ...?

27th Nov 2017, 10:12 AM
Ameer Hamza
Ameer Hamza - avatar
1 ответ
+ 6
Usually they are! In Javascript, arrays even have .push(), .pop(), .shift() and .unshift(), so you can use them as stacks or queues.
27th Nov 2017, 10:28 AM
Schindlabua
Schindlabua - avatar