Problem 3388 · Medium

Count Beautiful Splits in an Array

Split the array into three parts; a split is beautiful when the first part is a prefix of the second, or the second is a prefix of the third.

Open the interactive visualisation