Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

added Priority Queue #3971

Closed
wants to merge 4 commits into from
Closed

added Priority Queue #3971

wants to merge 4 commits into from

Conversation

Bhupesh-V
Copy link
Contributor

Fixes issue:

Changes:

  • Added C++ implementation of Priority Queues.
  • Added corresponding README.md file explaining Priority Queues.

@Bhupesh-V
Copy link
Contributor Author

Changes done

};

class PriorityQueue {
private:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unindent the whole class body.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

#include <cstdlib>

// Node Declaration
struct node {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call this Node.

std::cout << "Queue Underflow\n";
else {
tmp = front;
std::cout << "Removed item is: " << tmp->info << "\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove.

throw true;
else {
tmp = front;
std::cout << "Removed item is: " << tmp->info << "\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am actually not clear why should I remove this ??

@contactvaibhavi
Copy link
Member

@Bhupesh-V waiting for your changes!

@Bhupesh-V
Copy link
Contributor Author

@Bhupesh-V waiting for your changes!

Sorry I have been busy with college internals 😅

@Bhupesh-V Bhupesh-V closed this Jun 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants