Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
- Detect runs and answer suffix queries
Coding · Trees
- Find the Length of the Longest Common Prefix
Coding
- Longest Common Anagram Substring in Two Strings
Coding
- Longest Common Prefix
Coding · Array · String · Trie
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Google
Leetcode 3093. Longest Common Suffix Queries
Reported Nov 9, 2026 · 1 source report
JUNIOR
Source snapshot: Nov 12, 2026
View source