Grubhub Interview Question

Balance Parenthesis and Combined Duplicate Duplicate Sets