Given a sorted array of distinct positive integers and m, choose m elements so that the smallest gap between any two chosen elements is as large as possible, and return that gap.
Unlock detailed company stats for this questionUpgrade
Community answers
No answers contributed by the community yet.
Related questions
Given arrays A and B, build C with C[i] chosen from A[i] or B[i] so that the smallest missing positive integer of C is as small as possible, and return it.You may change any three elements of an integer array to any values. What is the smallest possible difference between the largest and smallest element afterwards?Given an array of integers and a number N, find the length of the longest contiguous subarray such that the difference between any two elements in the subarray is less than N.Related courses

Course
