typing_singh's blog

By typing_singh, history, 7 weeks ago, In English

https://cses.fi/problemset/task/1193

in this problem i m able to find out the minimum number of moves to get to the destination,but how to trace the path ,how to find string with shortest path. pls help!!
spookywooky i_am_legend1

 
 
 
 
  • Vote: I like it
  • -10
  • Vote: I do not like it

»
7 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

While creating the distance matrix you can also create an array p[] where you store for each vertex the parent of it whenever you update the distance matrix.

»
7 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

You can ask such questions in private message,no need to write a blog for it.