What is java priority queue?



What is java priority queue?..

Answer / Saurabh Srivastav

Java Priority Queue is an implementation of the Queue interface in Java. It maintains its elements as a priority queue, where the highest-priority element is always removed first. By default, it uses a binary heap to store elements and implements the PriorityQueue interface.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

What are sorting algorithms used for?

1 Answers  


What is sequential mapping in data structure?

1 Answers  


Does treemap sort on key or value?

1 Answers  


How to create your own data structure in java?

1 Answers  


Which data structures are used in bfs and dfs algorithm?

1 Answers  


Which is faster hashset or treeset?

1 Answers  


Explain what is the bucket size, when the overlapping and collision occur at same time?

1 Answers  


What do you mean by separate chaining?

1 Answers  


Can we apply binary search algorithm to a sorted linked list, why?

1 Answers  


What are the basic data structures?

1 Answers  


What is the difference between for and foreach loop?

1 Answers  


do records fall under linear or non linear data structures?

1 Answers  


Categories