Goldman Sachs interview question

Quick Sort, 3 sum question. Leetcode