Problem 2370 · Medium
Track the longest chain ending in each letter, and extend it from letters within k of the next one.
Open the interactive visualisation