• +91 9723535972
  • info@interviewmaterial.com

Data structure Interview Questions and Answers

Question - What are the disadvantages of implementing queues using arrays?

Answer -

There are two main downsides when implementing queues using arrays. They are as follows:

  • Array sizing: The queue has to be constantly extended to make way for more elements that get implemented. Always extending the size of the array will not be feasible as there will be a discrepancy in the creation of the correct array size.
  • Memory dumps: The memory that is used to store the queue elements cannot be reused to actually store the queue. This is because of the working of queues where insertion happens at the head node only.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners