graph-algorithms icon indicating copy to clipboard operation
graph-algorithms copied to clipboard

Not returning explicitly anything on Prim's algo

Open jordanmontt opened this issue 2 years ago • 1 comments

Currently, our Prim's algo implementation explicitly returns in the method run. See AIPrim>>#run. The last line it returns the edges. This breaks the API convention for all the other algos. If one checks, all of the other algos they do not explicitly return anything. We need to update the Prim's algo to not explicitly return in the run method but rather having a method called reconstructPath like in AIBFS for example.

jordanmontt avatar Jun 26 '23 14:06 jordanmontt

@dkgoutham

jordanmontt avatar Jun 26 '23 14:06 jordanmontt