You are viewing a single comment's thread. Return to all comments →
For the same program, how can we get the result if the required chocolate squares are not consecutive?
thats not what the problem states ( these types of problem are called maximum-sub array problems ) ,
Still you want to solve this problem, you need to use Combinations, which will increase the diffuculty.