Find largest subset sharing a common digit | Google Interview Question