Is priority queue a non-linear data structure?
If yes then why 开发者_JAVA技巧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.
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.
精彩评论