@Raghavan

if you want to fing the shortest path from a node u to v then its better to
use BFS
but according to your second post it seems you want to find path from root
node to a leaf, in that case DFS seems to be best

On Wed, Jun 15, 2011 at 9:56 PM, bittu <[email protected]> wrote:

> I think BFS will do That isn't it.??  lets say we have starting node
> v  & wants to find shortest path e.g leaf at lowest height say this
> node u so when you will do BFS each level will represent the shortest
> path between two nodes. shortest path=min dist(V,U)
>
> DS Used Queue
> Time Complexity O(N)
>
>
> Correct me if anything wrong
>
>
> Shashank
> Computer Science
> CSE,BIT Mesra
>
> --
> 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.
>
>


-- 
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee

-- 
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