BFS might be faster, though.
Don
On Tuesday, April 22, 2014 1:11:00 AM UTC-4, bujji wrote:
>
> Hi Don,
> At most we can reach a point from 4 adjacent points. So,
> time complexity will be O(XY) only.
>
> -Thanks,
> Bujji.
>
>
> On Mon, Apr 21, 2014 at 1:38 PM, bujji jajala
> > wrot
Good catch. A function called "markShortestPath" ought to mark the shortest
path, huh?
Don
On Monday, April 21, 2014 4:38:32 PM UTC-4, bujji wrote:
>
>
> Nice solution. good. Looks like in your markShortestPath(int
> i, int i, int d) function
> you missed to set distance[i][j
Hi Don,
At most we can reach a point from 4 adjacent points. So, time
complexity will be O(XY) only.
-Thanks,
Bujji.
On Mon, Apr 21, 2014 at 1:38 PM, bujji jajala wrote:
> Hi Don,
> Nice solution. good. Looks like in your markShortestPath(int
> i, int i, int d) f
Hi Don,
Nice solution. good. Looks like in your markShortestPath(int
i, int i, int d) function
you missed to set distance[i][j] = d; as first statement.
It looks like time complexity of this program is greater than O(XY). It
depends on number of multiple paths
to a point with dif