Skip to content

CompareTo Implementation in Priority Queue #13

Description

@ProfessorAtomicManiac

In order to not have to pass in the compareTo method for the priority queue, you need to have to write compareTo methods to compensate.

Example:
public int compareTo(Entry b){
if (key<b.key) return -1;
if(key>b.key) return 1;
return 0;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or requestwontfixThis will not be worked on

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions