I would use bfs in stead of dfs, anyway something iterrative not recursive.
În data de 20.05.2012 11:36, "Registered user" <[email protected]> a
scris:

> how do i traverse a 2d matrix of larger dimension ( say 1000x1000 ). i
> used dfs that showed correct answer for smaller dimension matrix but
> when larger dimension matrix came then error popped up "Stack over
> flow .. :( "
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" 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/google-code?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" 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/google-code?hl=en.

Reply via email to