Question 1:
Given Speed X units/minute, calculate the maximum time taken to travel between any 2 stations. Stations is an array of x,y co-ordinates
[[x1,y1],[x2,y2],...], and distance is calculated using euclidean formula sqrt((y2-y1)^2 +(x2-x1)^2);
Return Time in minutes rounded to 6 decimal places
Ex:
Speed: 5
stations:[[0,0],[0,2],[2,0]]
Ans:Maximum distanc=[0,2] to [2,0] = sqrt(4+4);
Time = sqrt(8)/5
Question 2:
Min swaps to make palindrome
Question 3:
Ships are aligned in layers, with following conditions:
Each ship has value(v)
Each ship in a layer is followed by [v^2+1]%M ships,with values from 0 to ([v^2+1]%M)-1
The first ship has value v=2
M is constant given as argument
Find The Total number of ships %M in all layers
Ex:
L=1
M=4
Output:1 //One layer thus only 1 ship