Algorithms and Data Structures

Top K Frequent Elements (C# and Python3)

Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.

Solution

C#

Python3

close

Don’t miss these tips!

We don’t spam! Read our privacy policy for more info.

No products in the cart.

Open chat
Powered by