dp ( i , j ) represents the minimum number of operations needed to make the array [ 0 . . i ] sorted in non - decreasing order given that ith element is j
dp = [ [ 0 for i in range ( large + 1 ) ] for i in range ( n ) ] NEW_LINE