Author: Mahmoud Badawy
Tester: Mohammed Ehab
Binary Search, Greedy
given an array of integers find an order such that the maximum value x that for every element (i+1)*x<=arr[i]
sort the array then use binary search to find the value
Sort the array because it’s better to assign the smallest value to the smallest i to make (i+1)*x smaller for this value then use binary search to find the maximum value
Sort the array and for each one find the maximum x he can use as it’s arr[i]/(i+1) then take the minimum between them
Binary Search solution can be found here.
Greedy can be found here.