I also thought to use a Trie for part two, thinking of it similarly to a typeahead problem, but I hadn't heard of Aho-Corasick.
I thought it was over-complicating a day one solution, so I ended up brute-forcing similar to above solutions. Still, it is nice to learn about this algorithm. I may come back to give it a shot and compare runtimes later. Thanks!
This sort of mirrors what my experience has been during my search. In the past, reaching out via LinkedIn or otherwise would merit a response (at least); however, in the current market, I never get a reply and in some cases I see the application is rejected. I feel like sending messages is hurting more than helping.
Likewise with follow-ups. Anytime I follow-up on an interview, I never hear back or it is rejected, so I've stopped following up after interviews completely.
What companies? Every company I've interviewed with in my loops recently have me coding in the first technical screen. I've had five of these interviews so far, various sizes. On-site is multiple levels of tech screens. And this isn't even for FAANG-exclusive companies. FWIW, I'm interviewing in a HCOL area for companies that pay well, so it may be more competitive.
People often speak of the mystical company that doesn't make you code in the interview, but I haven't come across it once in the current market.
I also don't know how comfortable I'd be joining a team that doesn't make me write code in some capacity during the loop... but I also recognize the ridiculousness of expecting correctness, optimal solutions, or the types of questions being asked. Discussing those things, sure, but expecting regurgitation is nonsense.
I thought it was over-complicating a day one solution, so I ended up brute-forcing similar to above solutions. Still, it is nice to learn about this algorithm. I may come back to give it a shot and compare runtimes later. Thanks!