Sorry, i confused val with weight of the edge.
BFS would be a better option.

On Jun 14, 5:31 pm, L <[email protected]> wrote:
> Any graph algorithm would work.
> If val is positive then use Dijkstra's algorithm, otherwise use
> Bellman Ford.
>
> On Jun 14, 5:07 pm, Raghavan <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
> >    How to find the shortest path in a 4-ary tree in an optimal way?
>
> > Node tree{
> > Node *left,*right,*top,*bottom;
> > int val;
>
> > };
>
> > Let the above given be the tree structure.
>
> > --
> > Thanks and regards,
> > Raghavan.K.L
> > <http://in.linkedin.com/in/raghavankl>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to