← Goldman Sachs questions
CodingReported in a candidate post, Sep 2021

Find best fit interval and second smallest element without sorting

Filed under Goldman Sachs

Given an unsorted array of integers, find the second smallest element without sorting the array. Additionally, address interval fitting and scenario-based overlapping interval queries.

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.