issues
search
withaspirit
/
Elevator-Simulation
Elevator System Simulation project
1
stars
1
forks
source link
Change RequestQueue.PriorityQueue to TreeSet
#163
Closed
withaspirit
closed
2 years ago
withaspirit
commented
2 years ago
Changes
Replaced RequestQueue's PriorityQueues with TreeSets
Benefits
TreeSet doesn't allow duplicates, you can peek the last and first elements, and you can get the size of the queue
TreeSet has natural ordering like PriorityQueue
Testing
All RequestQueue tests passed
Changes
Benefits
Testing