ByteDance Interview Question

Modified 3sum leet code question, database design in a family tree