Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But it is easier to check the the GP's solution:

    return definitions.get(candidate) != null;
vs

    foreach c in definitions(candidate.charAt(0)) {
        if c == candidate.charAt(1)) return true;
    }
    return val;
That leaves aside the general usefulness of knowing the definitions of words.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: