Tuesday, January 17, 2012

first point from where a truck will be able to complete the circle.

Given a circle. You have five points on that circle. Each
point corresponds to a petrol pump. You are given two sets of data.

1. The amount of petrol that petrol pump will give.
2. Distance from that petrol pump tp the next petrol pump.

(Assume for 1 lit Petrol the truck will go 1 km)

Now calculate the first point from where a truck will be able to
complete the circle.
(The truck will stop at each petrol pump and it has infinite
capacity).
Give o(n) solution. You may use o(n) extra space.

1 comment :

Anonymous said...

Hello,
your blog is very informative. It used to have solutions for all the questions, you put forward. but y is tat there is no answer for any of them now? I don't see answers for older posts, either. please fix that.

-Riya