explain me programs

Inaendelea Ilichapishwa Miaka 4 iliyopita Kulipwa wakati wa kujifungua
Inaendelea Kulipwa wakati wa kujifungua

here is a source (S) and destination (D) and a spacecraft has to go from S to D. There are N number of wormholes in between

which has following properties:

Each wormhole has an entry and an exit.

Each wormhole is bi-directional i.e. one can enter and exit from any of the ends.

The time to cross the wormhole is given and the space craft may or may not use the wormhole

to reach D.

The time taken to travel outside wormhole between two points (x1, y1) and (x2, y2) is given by a formula

|x1 - x2| + |y1 - y2|

where, (x1, y1) and (x2, y2) are the co-ordinates of two points.

The co-ordinates of S and D are given and we have to find the minimum time to reach D from S.

Note: It’s not mandatory to consider all the wormholes

sample input: source=(0,0), destination(100,100), warmholes=3 .

coordinates are: (1,2),(120,120)

(4,5),(120,100)

(6,8),(150,180)

Sample output=48

Uprogramu C++ C Programming Java PHP Software Architecture

Kitambulisho cha Mradi: #20439136

Kuhusu mradi

2 mapendekezo Mradi wa mbali Ipo mtandaoni %project.latestActivity_relativeTime|badilisha%

Imetuzwa kwa:

SriBhargava

I have solved many problems in hackerrank and I even qualified in Code-vita so I can explain the solutions to your problem with an elaborated explaination.

₹600 INR kwa siku 3
(Maoni 0)
0.0