Please read the new rule regarding the restriction on the use of AI tools. ×

help me this ST problem
Difference between en3 and en4, changed 132 character(s)
sorry for my bad english :<<↵

Given an array F of size n (n<=1e5) and a fixed k (k<=n-2). Perform the deletion of k elements, then arrange the elements in ascending order, calling W is the greatest minus between two consecutive elements.↵

Find the smallest W↵

input ↵

5 1↵

4 1 2 3 9↵

output ↵

1↵



UPDATE: Solution founded↵

https://www.geeksforgeeks.org/minimize-the-maximum-difference-between-adjacent-elements-in-an-array/

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English duonggsimp 2024-09-28 12:48:06 132
en3 English duonggsimp 2024-09-28 12:19:44 26 Tiny change: ' \n\n1\n\n\nUPDATE: Solution founded' -> ' \n\n1\n\n'
en2 English duonggsimp 2024-09-28 11:41:36 31 Tiny change: 'tput \n\n1' -> 'tput \n\n1\n\n\nUPDATE: Solution founded'
en1 English duonggsimp 2024-09-28 10:29:15 332 Initial revision (published)