i don’t understand how (i+1) came ?
lets say s=0 and e=4, then (i+1)=5, what the use ?
can you explain with example ?
thanx in advance.
i don’t understand how (i+1) came ?
lets say s=0 and e=4, then (i+1)=5, what the use ?
can you explain with example ?
thanx in advance.
hello @premang
taking mod with (i+1 ) will ensure that index j will be in between 0 to i (both inclusive).
this is the only reason we are using mod (i+1).
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.