Back to Questions

Find the Longest Word in Dictionary through Deleting

62.2K viewsAsked at Uber
Medium

Question Explain

Given a string $s$ and a dictionary of strings $d$, find the longest string in $d$ that can be formed by deleting some characters of $s$. If there are multiple long strings, return the lexicographically smallest one.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Find the Longest Word in Dictionary through Deleting - Interview Question