Amazing solution bro.🔥.. Kindly please solve my one doubt.. why can't we use single for loop and write both the conditions in that for loop only ..l have dry runned the code but l'm not able to understand why the answer is coming different when l am using both the conditions in one for loop only ....please please help me 🙏
@karunyadav63453 жыл бұрын
Kindly please reply brother Apka hi Sahara h ab🙏 ap ignore mat karna plz
@ProgrammersZone3 жыл бұрын
@@karunyadav6345 Yepp It will not give the same result if we run both the conditions in one loop as the value of each index changes in each iteration for example if our original array is [1, 2, 3, 0] and then after first iteration it becomes [2, 2, 3, 0] now after second iteration it becomes [2, 3, 3 0] after third iteration it becomes [2,3, 0, 0] and the answer till here is correct but once you do it for last iteration you'll get nums[nums[3]] as 2 which you should have got as 1 if you had gone in the videos approch so as long as the numbers are in increasing order it is fine but the testcases fail when numbers are in non increasing order so you must write both of them differently I hope this helps :)
@memories8037 Жыл бұрын
tum bahut sahi kam kar rahe ho mansukh bhai
@kallabhargavi-d7j8 ай бұрын
nums=[0,2,1,5,3,4] result1=[] for i in range(len(nums)): result=nums[nums[i]] result1.append(result) print(result1)
@Kumkum-n9v10 ай бұрын
how did you come up with this approach? I mean the thought process
@prekshathakkar5846 Жыл бұрын
Very good explanation. But I have one doubt while doing the second method, how can we derive the equation: nums[i] = nums[i] + n*(nums[nums[i]] % n) I mean how do we come to know that we need to use this equation?
@amitprajapati3630 Жыл бұрын
Nice solution brother
@SHUBHAMSINGH-f2g Жыл бұрын
nice explain sir😊
@deepakchaudhary01 Жыл бұрын
I really loved the way you explained, much appreciated !!
@jamtaranumber28413 жыл бұрын
thanks bruhh keep it up tumhe maang hi milega aise meri manokhmna
@ProgrammersZone2 жыл бұрын
Meri bhi aapke liye _/\_ Keep going :)
@shubhammaske3504 Жыл бұрын
Nice ... But how to find such type of logic or formula during attending question. could you please explain
@ProgrammersZone Жыл бұрын
Just write 4-5 examples and you'll observe the pattern even if you aren't able to its fine eventually with time it will happen but make sure ki har questions ko solve karne ke baad solution section me naye naye ways dekho with time tumhare mann me bhi click hone lagenge ye ideas
@neharathour61152 жыл бұрын
Bhai maja aa gya solution ma
@ronitbanerjee26782 жыл бұрын
Great explanation... thanks alot
@ProgrammersZone2 жыл бұрын
Glad it was helpful!
@abhishekkr8077 Жыл бұрын
Dhanyawad bhai..hmse 1 Q v nhi bnta hai aap kaisa soch lete ho..? kunal bhaiya ka videos dekhna suru kiye the phle Q me hi fass gye 😑
@ProgrammersZone Жыл бұрын
Bhai kunal ke videos to theek hai but follow Take U Forward and their videos for DSA. Follow A2Z DSA sheet and try the questions by yourself and look leetcode discuss section
@gauravmishra71582 жыл бұрын
so this means aise questions jisne lgae ho whi kr skta hai qki ye formula pta hona chahie already right?
@veersharma786710 ай бұрын
de we??
@archana094242 жыл бұрын
Thank you so much for such a good explanation.you are doing a great job.
@ProgrammersZone2 жыл бұрын
Happy to help :)
@neharathour61152 жыл бұрын
Bro make more and more vedio like this please
@kumkumrathour50152 жыл бұрын
Mast explation sir
@ProgrammersZone2 жыл бұрын
Thanks a lot :)
@sakethsaketh7502 жыл бұрын
thanks for the solution and you are very good at the explanation /// thank you so much
@ProgrammersZone2 жыл бұрын
You're Welcome
@junaidkhalidi70992 жыл бұрын
@@ProgrammersZone space comp. is O(1)
@surajmaity61942 жыл бұрын
Thank you
@ProgrammersZone2 жыл бұрын
You're welcome
@sufiyanjamadar78002 жыл бұрын
Bro plzz continue this series☺️
@ProgrammersZone2 жыл бұрын
Started Bro :) kzbin.info/www/bejne/fX27mJiuaMyUrsU
@vaishnavia.n.3123 жыл бұрын
Thank you very much, Great explanation, keep it up.
@ProgrammersZone3 жыл бұрын
Thanks a lot :)
@sourin.majumdar2 жыл бұрын
Bro aise formula dimaag mei aayegi kaise? memory optimised mei jo use ki hai
@ProgrammersZone2 жыл бұрын
Will make updated video with intution soon, at that time I was completely beginner so didn't have any idea of how to create videos :)
@rutikabhanuse73544 ай бұрын
@@ProgrammersZone par apne ab tak bataya nahi😢
@gauravchoubey55253 жыл бұрын
Nice explanation bro..bas woh red ki jagah white marker rakho plss dikh nhi rha tha ache ..
@ProgrammersZone3 жыл бұрын
Sure bro, I'll take care of that from next time. Do share with your friends :)
@brp3522 Жыл бұрын
Aur ye question easy marked hai aur sabse jyada acceptance ke saath🙂☕
@memogamer2852 жыл бұрын
bro logic kaise build kre apki tara?
@ProgrammersZone2 жыл бұрын
Just solve more and more examples you'll notice the pattern, also try to learn different approaches for one question.
@mukulsehgal21902 жыл бұрын
great
@ProgrammersZone2 жыл бұрын
Thank you
@kumkumrathour50152 жыл бұрын
Continue
@neharathour61152 жыл бұрын
I like share and subscribe you please make these types of vedio more and more
@abhinavkumar50003 жыл бұрын
Thanks a lot :)
@ProgrammersZone3 жыл бұрын
You're welcome! :)
@shivamdalania2 жыл бұрын
Bro how to find this equation?
@ProgrammersZone2 жыл бұрын
Bro just try out some examples and soon you'll start getting all this stuff :)
@Dekh_rha_hai_vinod.10 ай бұрын
Bro 1920 ???
@animeshpandey41382 жыл бұрын
bhai kunal bhai ke hi assignments bahut hai ya phir aur bhi karne chahiye khudh se agar khudh se karne hai to bata do kaha se karu please bhaiya
@ProgrammersZone2 жыл бұрын
Depends upon you, if you are into 1-2 year focus on codechef and codeforces and if you want to prepare for interviews do leetcode :)
@kunalpatil74732 жыл бұрын
Can someone give me full solution programm for this code please. I am Not able to run this in intellij idea.
@rishabhgurbani52352 жыл бұрын
how do we derive this formula? idea kaise aayega ki yeh formula banna chahiye?
@ProgrammersZone2 жыл бұрын
Try different examples and you'll observe this I did the same
@amaanullah132 жыл бұрын
bro ab nhi dikha rha hai 99% faster abto 6% faster hi dikha rha hai sirf
@ProgrammersZone2 жыл бұрын
Bro Time and Space Complexity par focus karo rest ye sab upar neeche chalta hai
@amaanullah132 жыл бұрын
@@ProgrammersZone okay 🤐 Bhai logic building mein dikkat aarhi hai😪. Kaise krein?
@aoodi-voltАй бұрын
bro
@ankitnishad78312 жыл бұрын
Everything was good till when you just put the formula and optimize the space i mean you haven't told how you approached that
@ProgrammersZone2 жыл бұрын
Will make updated video with intution soon, at that time I was completely beginner so didn't have any idea of how to create videos :)
@chinmaysawant13432 жыл бұрын
@@ProgrammersZone waiting for this or a link for article reference will also work. Thanks