โ† Nagarro questions

Find Kth Smallest and Largest Element in Array

Filed under Nagarro

Given an unsorted integer array `nums` and an integer `k`, find both the `k`-th smallest element and the `k`-th largest element in the array. Return them as a pair `(kth_smallest, kth_largest)`.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Nagarro questions

Collected from public candidate posts and coding forums. Updated Nov 2026.