For each index of an integer array, return the index of its k-th next greater element.
Unlock detailed company stats for this questionUpgrade
Example: [3,4,2,6,5], k=2. From 3 the greater elements are [4,6,5], so the second is 6 at index 4 (1-indexed).
Community answers
No answers contributed by the community yet.
Related questions
Given an array of integers, find the next greater integer for each element in the array.Find the k-th largest element in an array and return its index.Given an integer array, return the number of unique products of the digits of each element.Related courses

Course

Course
Course
