Algorithm · Akuna Capital · Easy
Given an integer array, determine both the lowest remainder produced when its values are divided by a constant K and the greatest element in the array. Return these results in an array: place the minimum remainder first, followed by the array's maximum value. The minimum remainder is the least value among all element % K results, while the maximum is the highest array element. Input An integer array named arr An integer K Output Return an array of two integers: the smallest…
Checking your access…