Stack Bash - Master data structures and algorithms

Kth largest in an array

Medium
Given an unsorted array of numbers, find the kth largest element.
For example, if k = 3 with the following input array:
A = [5, 3, 7, 0, 6]
Your function should return 5 since its the largest number after 7 and 6.

Solution

6 Essential Sorting & Searching Coding Interview Problems

Master Sorting & Searching by trying the coding challenges below.
  1. 1.Implement binary searchEasy
  2. 2.Merge intervalsMedium
  3. 3.Kth largest in arrayMedium
  4. 4.Intersection of ArraysMedium
  5. 5.Search sorted matrixHard
  6. 6.Search row & col sorted matrixHard