Tag Archives: Sorting

Kth largest element in an array (Method 1)

Question: Given an unsorted array of integers and a number ‘k’. Return the kth largest element in the array. Input: arr = {3,2,1,5,6,4}, k = 2 Output: 5 Given an unsorted array of integers, you need to determine the kth largest element. By taking a first glance at the problem we can be sure of one thing. If… Read More »