Longest Common Suffix Queries

Solution Code
Verifying access...

Time Complexity

O(N + M)

Space Complexity

O(N)