Search
⌘K

Leetcode 3093. Longest Common Suffix Queries

For each query string, find the index of the container string that shares the longest common suffix with it, breaking ties by the shorter container string and then by earlier occurrence. The challenge is to preprocess the container words (e.g., by reversing or indexing suffixes) so you can answer many suffix-matching queries efficiently.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.