Samsung | Software Developer | 7 December
Question · Posted Apr 2020
There is one spaceship. X and Y co-odinate of source of spaceship and destination spaceship is given. There are N number of warmholes each warmhole has 5 values. First 2 values are starting co-ordinate of warmhole and after that value no. 3 and 4 represents ending co-ordinate of warmhole and last 5th value is represents cost to pass through this warmhole. Now these warmholes are bi-direction. Now the to go from (x1,y1) to (x2,y2) is abs(x1-x2)+abs(y1-y2). The main problem here ...
The full answer & interview discussion are available to premium members.
Log in Create a free account