No video

1823. Find the Winner of the Circular Game | Queue | Recursion | Math | 3 Approaches

  Рет қаралды 5,053

Aryan Mittal

Aryan Mittal

Күн бұрын

Пікірлер: 29
@selfsigma9764
@selfsigma9764 Ай бұрын
You become a person for me which gives best explaination with reason. After watching you, I becomes sure that I haven't missed any aspect and approach of the problem to look another person's explaination. Please keep it up. And also do recommend the similar problem to look after.
@mohammedansil2302
@mohammedansil2302 Ай бұрын
Brother your video helped me to get uo to the hr round atleast even then i got rejected still i passed the dsa round beacause of your daily leetcode solving
@ShubhamSharma-sf8wk
@ShubhamSharma-sf8wk Ай бұрын
Thanks for the Queue tip, it was helpful and soooo simple.
@JayRamNai
@JayRamNai Ай бұрын
Thanks for very detailed explaination
@myvinbarboza3038
@myvinbarboza3038 Ай бұрын
Say we have k=2 [F0,F1,F2,F3,F4]{0,1,2,3,4} 1) we kill the 1st index as 0+2-1(startindex+k-1) = [F2,F3,F4,F0]{0,1,2,3} F2's new index is curIndex-K for n-1 array so if we want the index for F2 in n it would be curIndex+k hence solve(n,k)= (solve(n-1,k)+k)%n The modulo is just used to get it in bounds I did not get this looking at other videos you explained it perfectly and this is what I learned. Thank you. :)
@darshanvanjara
@darshanvanjara Ай бұрын
thanks bhaiya
@ARYANMITTAL
@ARYANMITTAL Ай бұрын
❤️❤️🫂
@amitpandey9610
@amitpandey9610 Ай бұрын
You are greattt!!!!
@TusharBharatRevagade
@TusharBharatRevagade Ай бұрын
Thanks bhaiya... Maine sab utube channnels dekh liye iss question ke soln wale lekin aapke tarah kisi ne explain nii kiya...
@codecode855
@codecode855 Ай бұрын
Exact Josephus problem
@sivalokesh3997
@sivalokesh3997 Ай бұрын
Watched till 6:53. Learnt a queue, modulo and a list can ve used for cyclic problems
@saisree04
@saisree04 Ай бұрын
Amazing explanation thank you so much
@IK-xk7ex
@IK-xk7ex Ай бұрын
Thank you. Unfortunately I couldn't understand O(n) solution, I will try to watch the explanation more times
@harshit-q8x
@harshit-q8x Ай бұрын
why the loop start from 2 till
@raviroy84
@raviroy84 Ай бұрын
Excellent explanation
@codedesigner8839
@codedesigner8839 Ай бұрын
really difficult to come up with such intuition in hacker rank / interview rounds
@abirbanerjee839
@abirbanerjee839 Ай бұрын
Solved it easily using queue...but firstly I tried to solve it using circular linked list as it came to my mind first and I thought it was the most appropriate approach to solve this one. The circular way of traversing, the deletion of a particular element, all suggested to use a circular ll. But it threw a run time error. Was I initially right in my logic?
@mohammadsohail1634
@mohammadsohail1634 Ай бұрын
i did using circular linked list ..it worked
@alenscaria1516
@alenscaria1516 Ай бұрын
thank you!
@Sandeep-tn8mz
@Sandeep-tn8mz Ай бұрын
BroI coudnt quite get your Stack Approch. @4:22 you are Pushing an item and popping it in very next line. I don't understand how it worked for you!!! Or should that be pop(0) ?? because I am coding it In python. After appending , the very next line the pop operation is removing last item which I just added.
@javiergonzalez3791
@javiergonzalez3791 Ай бұрын
The thing is that he is not using a stack, he is using a queue, so it works as FIFO (first in, first out). In this case he adds the element to the end of the queue, and he removes the element that is in the first position. Since you are using python, you should use pop(0) to indicate that you want to remove the first element, otherwise it would remove the last element as you have described
@Sandeep-tn8mz
@Sandeep-tn8mz Ай бұрын
@@javiergonzalez3791 Thank you for the clarification
@Ayush37262
@Ayush37262 Ай бұрын
Bhai iss baar weekly ke solutions kyu nhi bnaye??
@ARYANMITTAL
@ARYANMITTAL Ай бұрын
Bhai discord pr contest discussion pr dekho ❤️🫡
@anjalidwivedi2232
@anjalidwivedi2232 Ай бұрын
​@@ARYANMITTALBhaiyaa where to find discord link?
@ARYANMITTAL
@ARYANMITTAL Ай бұрын
Ye lo ji ❤️ - kzbin.info/www/bejne/eaTNZ2iHibiVY5Y
@ARYANMITTAL
@ARYANMITTAL Ай бұрын
Desciption me mil jaaega
@naamnhibataunga5897
@naamnhibataunga5897 Ай бұрын
solving the question with the help of queue was easy... but coming up with the O(n) solution was hard...🫥🫥
1598. Crawler Log Folder | Stack | Array | O(1) Space
6:15
Aryan Mittal
Рет қаралды 1,2 М.
1518. Water Bottles | O(1) time | Math | 2 Approaches
14:54
Aryan Mittal
Рет қаралды 3,6 М.
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 4,3 МЛН
Violet Beauregarde Doll🫐
00:58
PIRANKA
Рет қаралды 36 МЛН
Has Generative AI Already Peaked? - Computerphile
12:48
Computerphile
Рет қаралды 967 М.
ML Was Hard Until I Learned These 5 Secrets!
13:11
Boris Meinardus
Рет қаралды 282 М.
The BEST Way to Find a Random Point in a Circle | #SoME1 #3b1b
18:35
Recursion Special: Predict Winner of Circular Game || Algorithms for Placement
22:59
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 334 М.
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 4,3 МЛН