Some students are sitting in a straight line giving an examination...The Students positon are given in an array.And the distance up to which a student can talk is also given.We have to find the minimum number of sets of questions required so that nobdy could cheat....
For eg . if a={ 1,2,3,4,5} and distance=1(each student can approach one bench ahead and one bench behind)
then minimum of 2 sets are required..(give questions alternately)
if a={0,4,5,6,7,12,13,14,16,17} and distance =5
Then minimum of 5 sets are required ...
What would be the algorithm ??Can any body suggest sth here..
2006-07-30
18:40:19
·
1 answers
·
asked by
sumantbhardvaj
1
in
Computers & Internet
➔ Programming & Design