how the combination working here like 3c2 ?
if i am getting 1 three times what does it mean to take combination by 2 in base?
and one more thing we are adding 0 in prefix sum by ourselves so why we are counting it in when we are finding prefix sum?
Combination concept
at timestamp 8:25 bhaiya explains by taking an array that
out of 3 same numbers occuring u need to select 2( left and right bound of the array ) which has the same sum
left and right bound of the array
2 indexes make up 1 array hence taking 3c 2
this is an important base condition because initially the sum = 0
and since the array is containing prefix sum so it is impt to recored initial sum
hence the entry 0 is also counted
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.