views:

46

answers:

1

If yes then why priority queue is a non-linear data structure? Does non-linear data sturctures are bad in performance as compared to linear ones? If yes then why? Please explain in detail.

A: 

Linear Data Structures are lists and arrays. Priority Queue is an abstract data structure (abstract means it can be implemented in terms of other data structures in multiple ways) usually implemented in terms of a heap. For performance measurement, usually the asymptotic cost of operations is used. For example, how much time does N insertion operations take?

Sorry this is an incomplete answer. A complete answer is beyond the scope of SO.

Amit Kumar
What makes a Data Structure linear or non-linear in the first place? What data structures are good for searching and sorting?
Maxood
Did you try searching on google? What do you think? It is irritating to try and answer a bunch of questions asked point-blank without a knowledge of how much effort the asker has put to try to find an answer himself.
Amit Kumar
Thanks. I agree with you.
Maxood