Kth Largest Element in an Array at TikTok
Medium68.8% acceptance
This problem has 75.0% frequency at TikTok.
Problem Description
Given an integer array `nums` and an integer `k`, return _the_ `kth` _largest element in the array_. Note that it is the `kth` largest element in the sorted order, not the `kth` distinct element. Can you solve it without sorting?
Read full problem and hintsTopics
Also asked at 44 companies
More TikTok Questions
Number of IslandsMediumTrapping Rain WaterHardMerge IntervalsMediumLongest Increasing SubsequenceMediumSubarray With Elements Greater Than Varying ThresholdHard
View all TikTok questions