Problem 1458 · Hard

Max Dot Product of Two Subsequences

Choose two equally long nonempty subsequences to maximise their dot product. The visual shows a DP grid aligning the two sequences.

Open the interactive visualisation