← Goldman Sachs questions

Swap variables without extra variable & Find single non-duplicate

Filed under Goldman Sachs

Task 1: Swap two integers a and b without using a temporary third variable. Task 2: Given an array where every element appears twice except for one, find that single non-repeating element in O(n) time…

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.