Find largest subset sharing a common digit | Google Coding Question