AI Features

Longest Common Suffix Queries

Try to solve the Longest Common Suffix Queries problem.

Statement

You are given two arrays of strings, wordsContainer and wordsQuery.

For each string wordsQuery[i], find the string in wordsContainer that shares the longest common suffix with it.

  • If multiple strings in wordsContainer share the same longest suffix, choose the one with the smallest length. ...

Ask