Skip to content
Snippets Groups Projects
Commit 13958ce8 authored by pjs's avatar pjs
Browse files

bug fix in bubble_down

parent 71343db7
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ class PriorityQueue
def bubble_down(index)
target = @elements.pop
return if empty?
loop do
child_index = (index * 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment