java

Breadth-first Search in Java

I recently had to solve a problem that involved finding the shortest path between two vertices (or nodes). A DuckDuckGo search suggested that an algorithm called breadth-first search was the way to go. Here’s an implementation in Java, based on chapter 22 in¬†Introduction to Algorithms¬†by Cormen et al. Source on Read more…

By Mikael, ago