The 'classic 1point3acres stop words problem,' reported on Perplexity phone screens (and described as easier than the ToDo-list round). Part 1: given a string and a stop-word vocabulary, return the substring before the first stop-word occurrence (a stop word may appear anywhere as a substring). Part 2: process input too…