← Swiggy questions
CodingHardReported in a candidate post, Jul 2025

Count distinct substrings of a string using a suffix array

Filed under Swiggy

Given a string s, count the number of distinct non-empty substrings of s using a suffix array (and the longest common prefix array of adjacent suffixes).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Swiggy questions

Collected from public candidate posts and coding forums. Updated Nov 2026.