Necesito a crear una cola de prioridad implementada por un árbol de búsqueda binaria (BST) para mi clase de algoritmos II. Sin embargo, no estoy seguro exactamente cómo utilizaría un árbol de búsqueda binaria como una cola de prioridad. Podría alguien aclarar qué es lo que la asignación me está pidiendo que haga?
Como referencia, aquí están los métodos de la PriorityQueue debe poner en práctica:
add – adds a new item to the queue
peek – returns the head of the queue
remove – removes the head of the queue and returns it
search – returns the position of an element in the queue, or -1 if it is not found.
size – returns the total number of elements in the queue
inorder – returns an in-order, comma-separated string of every element in the queue
preorder – returns an pre-order, comma-separated string of every element in the queue
height – returns the height of the underlying BST
Gracias de antemano por cualquier consejo !!













