Company: NXT wave_18oct
Difficulty: medium
Enhance Consistency in a Sequence of Decisions Problem Description Given a 2D matrix decisionMatrix of dimensions n x m , where each element denotes a decision made. A decision can be D (denoting a Desirable outcome) or U (denoting an Undesirable outcome). Your task is to maximize the consistency of decisions along any row or column. Consistency is enhanced by transforming D to U and vice versa. You are allowed a maximum of K transformation operations. The transformation ability will be halved for the subsequent operation (rounded down to the nearest whole number). Additionally, for every row or column, having a higher number of identical decisions contributes more towards an overall score of that row or column. The objective is to maximize the lowest score among all rows and columns. Task Details: Transform the decisions in the matrix in such a way that the minimum number of any row or column, containing the longest sequence of identical decisions ( D or U ), is maximized. After each