beginner99
BAN USER
Questions (2)
Comments (3)
Reputation 45
- 0of 0 votes
AnswersWe are given a matrix of MxN elements with each element either being 0 or 1.Find the shortest path between a given source cell to a destination cell.
- beginner99 in India
An element value of 0 means we cannot create a path out of that cell| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm Amazon Arrays Matrix
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
123789
124560
Comment hidden because of low score. Click to expand.
-1
of 1 vote
If we see the values of what each functions return we will be able to see that it is only 0 and 1.
Assuming we are allowed this we can apply a quick sort on these values such that each swapping is reflected on the actual array as well.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Looks like Warshall's Algorithm??
- beginner99 December 17, 2012