Available question text
Reconstruct the lexicographically smallest length-n lowercase string whose suffix-pair longest-common-prefix lengths match the given n×n lcp matrix, or return an empty string if no such string exists. The core challenge is checking consistency of the equality/inequality constraints implied by lcp entries across overlapping suffixes and assigning the smallest possible letters to each position.
Related questions
Continue with questions that share topics or the same question type.
- Find All Anagrams in a String
Coding · Hash Table · Sliding Window · String
- Find And Replace in String
Coding
- Find First Palindromic String in the Array
Coding
- Find Kth Bit in Nth Binary String
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2573. Find the String with LCP
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source