Minimize Max Diff (CS Academy Problem)

Revision en2, by I_love_penny, 2017-06-22 08:37:34

How to solve this problem using binary search.
Problem Statement :
You are given an array A of N integers in nondecreasing order. Remove K integers such that the maximum difference between two consecutive elements is minimized.
​​Problem Link
solution using binary search (I am not getting its intuition). ​​

Tags binary seach

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English I_love_penny 2017-06-22 08:37:34 8 Tiny change: 'ry search.\nProblem ' -> 'ry search.<br>\nProblem '
en1 English I_love_penny 2017-06-22 08:11:42 459 Initial revision (published)