India’s Best Job Seekers and Training Platform Forums Data Structure There is an island surrounded by oil mines. You will be given n companies…

  • There is an island surrounded by oil mines. You will be given n companies…

     Akash  updated 1 year, 10 months ago 1 Member · 1 Post
  • Akash 

    Administrator
    at

    There is an island surrounded by oil mines. You will be given n companies and m oil mines having values. You have to distribute the mines to “n” companies in fair manner. Remember the companies can have oil mines adjacent to each other and not in between of each others.After distributing them compute the differnce of oil mines from the company getting highest and company getting lowest. This number should be minimum.(then only the distribution can be termed as fair).

    Example

    Input

    2

    2 4

    6 13 10 2

    2 4

    6 10 13 2

    output

    5

    1

Viewing 1 of 1 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now

New Report

Close