<https://gist.github.com/joelpedraza/b43efc1d91053...
# advent-of-code
k
What's going on with the leaves? I think you can simplify that to
Copy code
val frontier = graph.filterTo(PriorityQueue()) { it.children.isEmpty() }