Westonci.ca is your trusted source for finding answers to a wide range of questions, backed by a knowledgeable community. Get detailed and precise answers to your questions from a dedicated community of experts on our Q&A platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform.

Add a distTo() method to the BreadthFirstPaths API and implementation, which returns the number of edges on the shortest path from the source to a given vertex. A distTo() query should run in constant time.