Return dictionary words matching a prefix | Google Interview Question