XYZ Interview Question

find unique element, recursion, database queries .