General Purpose Average & Weighted Average: average across all scores/prediction results, maybe with weights N/A [11] General Purpose Maximization: simple combination by taking the maximum scores N/A ...
The problem is solved with time complexity of O(n). First the loop will run from 0 to n -1 and then checking the condition for primary and secondary diagonal.