โ† Cohesity questions

Minimal substring matches between two strings

Filed under Cohesity

The question

Given two strings s1 and s2, find the total number of substrings such that s[i..j] equals s[k..l] and the length (j-i+1) is minimal.

No write-up yet. Related questions below have one.

Related Cohesity questions

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