Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is a PriorityQueue?
Think about how elements get removed.
Name a method you can use to add elements to a PriorityQueue.
What method lets you introduce new tasks?
What does a PriorityQueue do?
Think about which task gets completed first.
True or False: In a PriorityQueue, an element with a higher number always has higher priority.
Consider how numbers are ordered.
Develop a PriorityQueue for a traffic signal system where cars are prioritized based on their type (ambulance, fire truck, regular car). Discuss your approach.
Consider which vehicle should go first and why that matters.
Implement a PriorityQueue within a game that processes players' actions based on their speed or attack power. Outline how you’d implement this.
Think about what makes a player act faster or more effectively.
5 more questions in this section. Enroll free to practise them all.
Enroll free