The other way to do it would be to forget about the edge weights and just build the spanning tree by selecting a random edge from an already-connected block. But then I wouldn't have had to remember all that stuff about priority queues and heaps, and where's the fun in that?
The spanning tree guarantees that there are no cycles, every square is accessible, and there is exactly one path from the start at the lower left to the end at the upper right.
Just now discovering the adverbial use of "lowkey" through my kids’ favorite YouTubers. I feel very old.
A beautiful celebration of the Resurrection yesterday, capped with the virtual choir's singing of the Hallelujah Chorus. Alleluia! Christ is risen indeed!
Apparently my 10×great grandfather was a delegate to the Synod of Dort. Cool!
mild potty humor
Read the whole recipe next time!
“You shall eat it as a barley-cake, baking it in their sight on human dung.” -Ezekiel 4:12
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!