You are given a class of n students, each student is given some work value a[i], taking some amount of work from a student and assigning it to some other student will increase it by a factor of K.
Redistribute the work such that each student will have to do an equal amount of work. Determine the minimum from the work value. Record it upto 2 decimal places.
n = 2 and k = 1.5 a = [2,8]
take 2.4 from 2nd element and give it to 1st element
hence a[0] = 2+2.4*1.5 = 5.60
a[1] = 8-2.4 = 5.60
Complete the function minimum_possible_work.
Print minimum possible work that all students would have to do, round upto two decimal places.
time limit: 5sec
Memory limit: 256MB
Source Limit: 102 MB
Please provide solution with intutition and similar leetcode questions