Atlassian OA
Atlassian · Question · Posted Aug 2023
The developers of Hackerland are working on a array reduction algorithm that takes in an array of n integers say arr and does the following until the array arr is empty => Initialize an array result as an empty array => choose an integer k such that 1 <= k <= length of the array => Append the MEX of the first k elements of the array arr to the array result => Remove first k elements of the array ...
The full answer & interview discussion are available to premium members.
Log in Create a free account