Airbnb SDE Interview Question 2023 August | Two Pointers & Sorting | Off-campus

Question · Posted Jun 2026

Question 1: 3Sum Problem Statement Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, j != k, and nums[i] + nums[j] + nums[k] == 0. The solution set must NOT contain duplicate triplets. Constraints 3 <= nums.length <= 3000 -105 <= nums[i] <= 105 Examples Example 1: Input: nums = [-1, 0, 1, 2, -1, -4] Output: [[-1, -1, 2], [-1, 0, 1]] Explanation 1: After sorting → [-4,-1,-1,0,1,2]. ...

The full answer & interview discussion are available to premium members.

Log in Create a free account