← Goldman Sachs questions

Reverse Linked List and Find K Max Elements in Stream

Filed under Goldman Sachs

Part 1: Reverse a singly linked list in-place in linear time with O(1) extra space. Part 2: Design a system to dynamically track and output the K maximum elements seen so far from a continuous stream…

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.