← Nagarro questions

Form longest string from string pairs with matching ends

Filed under Nagarro

Given a collection of two-character strings, find the maximum length of a combined string formed by chaining strings where the last character of one matches the first character of the next.

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 Nagarro questions

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