Hard Problemsstringminimization

Min cost to sort strings using Reversals

Given an array of strings, where each string may be reversed at some given cost or left as it is, find the minimum total reversal cost that leaves the array sorted in lexicographic order.

Do this lesson first: house robber

The full breakdown and animated table for this problem are still being written. In the meantime, run the four questions on it yourself — that is the whole exercise.