Databricks interview question

Matrix, string manipulation, DP, greedy