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

Find the kth largest number in a stream

Filed under Goldman Sachs

Design a class that tracks the kth largest element in a stream of integers. It is created with k and an initial list of numbers; each call to add(val) inserts a value and returns the current kth…

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.