Find the alphabetically smallest string that conforms to the LCP array
Find the smalletst string from LCP matrix
Tip
You can read this hacker rank webpage to understand what is the LCP and the suffix matrix
You can read this hacker rank webpage to understand what is the LCP and the suffix matrix