I did my solution please look over the soln of divisible subarrays problem

I did my solution please look over the soln of divisible subarrays problem and please do tell me what I am doing wrong…

Hi @gupta.ritik2002
In ur code, u r trying to find all subsequence with sum divisible by n whereas in this problem , we need to find all subarray with sum divisible by n.
eg if arr={1,2,3,4,5}, possible subarray are {2,3},{5},{1,2,3,4},{1,2,3,4,5}, etc. which need to be found. whereas possible subsequence are {1,4,5} ,etc which are not required to be taken into account.
I will suggest u to go through the video lecture of dis problem once. The solution of this problem has been discussed there.
Hope dis resolves ur doubt.

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.