Skip to content

Method to solve Dijkstra's algorithm for a graph of nodes and edges as specified by user. In other words, how to find the shortest route between two locations on a map, when all locations are connected by different paths.

Notifications You must be signed in to change notification settings

douglaschu/cookiedelivery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cookiedelivery

You are but a humble pastry chef who moved to a new town at the beginning of the year to start your own boulangerie/patisserie, the culmination of your childhood dreams. Thanks to your hard work, a little luck, and a rave review in the local alt weekly, your little French bakery has become a celebrated part of both the daily routines and special occasions of the citizens of your new town.

To thank your favorite regulars, you have decided to hand-deliver boxes of your special Christmas shortbread to their homes. But you cannot be out on delivery, away from your lovingly floured counters for too long, as you received more orders of Bûche de Noël than you were expecting. And oh dear, what's this? It's the mayor calling on the telephone. He has ordered a gingerbread house at the last possible minute to be ready on Christmas Eve! Time is of the essence. All that fondant won't sculpt itself.

You will need to take the shortest possible routes between each house on your shortbread delivery list. But how?

Your solution should, using Go, produce the shortest path between any two houses in the neighborhood, given a starting location and a target location.

Include a set of executable tests for your solution. The following is a set of inputs for which the correct result is known:

[See neighborhood.txt for list of nodes and edge values. Visual representation of neighborhood graph TBA]

Given: startLocation: Natalie's House targetLocation: Jake's Haunt

Expected result: distance: 31 path: ["Natalie's House", "Sophia's Apartment", "Jordan's Condo", "Danielle's Den", "Jake's Haunt"]

About

Method to solve Dijkstra's algorithm for a graph of nodes and edges as specified by user. In other words, how to find the shortest route between two locations on a map, when all locations are connected by different paths.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages