Search
⌘K
Get Premium
Leetcode 1923. Longest Common Subpath
Given m integer paths over cities 0..n-1, find the maximum length L such that every path contains some contiguous subarray of length L; this is the longest common contiguous subarray problem, typically solved efficiently with binary search plus rolling hashes or suffix structures to handle total input size up to 1e5.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.