Yugabyte interview question

coding - DP + arrays strings + pattern matching