Find First Prefix-Matching Word | Pinterest Interview Question