I watched a lot of other videos on this and your explanation is the clearest and helped me a lot. Thank you so much!
@valeesi3 жыл бұрын
Completely agree. Very well explained. Thank you!
@codeExplainer3 жыл бұрын
Great to hear! . Keep supporting and keep learning.
@shreyasingh12583 жыл бұрын
@@codeExplainer trulyy! you have a way with explaining things and simplifying them! helping us a lot
@akashjain42813 жыл бұрын
Precise explanation!✌
@codeExplainer3 жыл бұрын
Glad it was helpful!
@prateeksomani58033 жыл бұрын
Why we are choosing counterpart of x as m-x. For example if x = 13 and m=5 then m-x = -8 but 13%5 = 3 so we need 2 but m-c gives -7 . So it should be m-(x%m) or m-x is correct ?? Please tell if I'm wrong
@NNELATURIASHOKKUMAR3 жыл бұрын
Nice explanation sir waiting for upcoming contests videos too.
@codeExplainer3 жыл бұрын
sure, more videos are coming soon.
@nidhishprasad25063 жыл бұрын
Why we are not checking m-i.first
@AnkitKumar-sz5wu3 жыл бұрын
If we do so then we would calculate the same values twice. Let m = 8 , i.first = 2 then we would do the calculation once for (m - i.first) = 6 but if we calculate for (m - i.first < i.first) then we would do the same calculation when i.first = 6 since then (m - i.first) would become 2. This happens because he is updating the value of references a and b but not the actual values in the map.
@nidhishprasad25063 жыл бұрын
@@AnkitKumar-sz5wu Thanks for clarifying.
@UMEMrinalAnand3 жыл бұрын
1491 C pekora and trampoline
@sohanursohan24263 жыл бұрын
would u please provide the solution of E1 of these contest.
@Anonymous-pj2mv3 жыл бұрын
Is there any use of second condition
@codeExplainer3 жыл бұрын
ya maybe it is not required, u are right.. thanks
@Anonymous-pj2mv3 жыл бұрын
@@codeExplainer thx bro for confirmation :}
@satyamsrivastava90343 жыл бұрын
your code is only self explainatory...
@codeExplainer3 жыл бұрын
thanks brother..
@harshgupta33013 жыл бұрын
bhaiya ek doubt hai ki a=a-(b+1)kaise likha aapne ?? ,usme thoda confusion hai :(
@codeExplainer3 жыл бұрын
a=a-(b+1) ka reason hai , i have first check which is bigger a or b , and if found out a is bigger , which means occurrence of a is large , and thus we can form an array with alternative a and b, and because a is larger we can put the numbers like abababa.. and so on , so in that array which we will form by alternative a and b, so for lets assume we have 3 b's we can put abababa , and thus we have used b+1 a's , and thus this number of a's are used in the original array , and the rest of a's which are left , have to be inserted in separate array , and thus how much a's are left a=a-(b+1) , i hope this helps.
@harshgupta33013 жыл бұрын
@@codeExplainer ohhh ,bilkul clear ho gaya ab , thanks a lot bhaiya :)