← Goldman Sachs questions
CodingReported in a candidate post, Jul 2025

Kth smallest or largest element in an unsorted array

Filed under Goldman Sachs

Given an unsorted array and an integer k, return the kth smallest (or kth largest) element in sorted order, not the kth distinct element.

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 Goldman Sachs questions

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