C Facebook Interview Questions

Write a function that takes an unsorted integer array, and returns a three element subset whose sum is zero.

Note: This is a special case of the SUBSET-SUM problem. That problem is NP-complete, but we're only looking for subsets of 3 elements. This can be achieved in polynomial time.