This is really helpful .Thanks for sharing such useful videos
@ShivamGupta-dm7kf4 күн бұрын
public String stringShift(String s, int[][] shift) { int len = s.length(), totalAmountOfLeftShifts = 0, totalAmountOfRightShifts = 0; for(int[] move: shift) { if(move[0] == 0) totalAmountOfLeftShifts += move[1]; else totalAmountOfRightShifts += move[1]; } //max shifts you can do is len-1 totalAmountOfLeftShifts %= len; totalAmountOfRightShifts %= len; if(totalAmountOfLeftShifts > 0) s = s.substring(totalAmountOfLeftShifts) + s.substring(0, totalAmountOfLeftShifts); if(totalAmountOfRightShifts > 0) s = s.substring(len-totalAmountOfRightShifts) + s.substring(0, len-totalAmountOfRightShifts); return s; }
@ShivamGupta-dm7kf4 күн бұрын
not working
@ShivamGupta-dm7kf4 күн бұрын
can you explain bhaiya?
@RishabhDhiman-zf5wd5 күн бұрын
jounrey
@arkadeepmukherjee70216 күн бұрын
see basically left will be moved till it finds a line greater than the right and vice versa right will be moved till it finds a line greater than left as a result min of left right is taken and mul with the length.(tip-area=l*b(or h)) therefore as L decrease h should increase
@VishalPandey-n7x7 күн бұрын
Some corrections public static ArrayList<Integer> duplicates(int[] nums) { // code here ArrayList<Integer> res = new ArrayList<>(); int f=0; for(int i =0;i <nums.length;++i) { int index =Math.abs(nums[i])-1; if(index>0){ if(nums[index] < 0){ res.add(Math.abs(nums[i])); f=1;} nums[index] = -nums[index]; } } if(f==0) res.add(-1); return res; } }
@SanthoshaK-px8rq10 күн бұрын
Thank you so much brother. helped today a lot
@milindbhatt105210 күн бұрын
broo amazing
@feelyourbeat782012 күн бұрын
Nice codebix 🎉
@rushikeshsable343712 күн бұрын
Testcase pass ni hora😢
@roy_enigma13 күн бұрын
Thank you for make it simple
@mysteriousme783814 күн бұрын
worst explanation
@user-oi5ls4rs5g15 күн бұрын
great explain
@KunalChaudhary96215 күн бұрын
ismai yai formulas toh collage mai padhaya hii nahi hai 0(n2) yai syb
@AnishRaj-l7n16 күн бұрын
Very nice
@user-pi5ns1jv6t18 күн бұрын
lekin bhai wrong anser aa rha tha n^2 mein
@karthikgururajan113120 күн бұрын
Explanation was amazing , absolute perfection
@CSEA_58ShayoriBhowmick20 күн бұрын
Very nice explanation thank you for your efforts ❤❤❤
@dibyanshuratandwivedinitkk432221 күн бұрын
BEST EXPLAINATION
@piyushmishra196122 күн бұрын
Thanks it was great
@technohungrypihu25 күн бұрын
you are ezsnippet
@Samtoosoon25 күн бұрын
Great
@manishchauhan581129 күн бұрын
sir why are you not making new problems?
@user-en1pd3zc7eАй бұрын
Thanks a lot it will help to many students
@GurshxnsАй бұрын
your voice made me wet (i am a guy)
@kingshorts12590Ай бұрын
wonderfull video
@sujalbhor5705Ай бұрын
Awesomeeee ❤🎉
@TheMdaliazharАй бұрын
Thanks for making this video
@RoshniDesigns-fm3qlАй бұрын
If you get it 26:30 😅
@bhagyashritamrakar1280Ай бұрын
Excellent explanation
@rohan8758Ай бұрын
Nice explanation bhaiyan!
@yashikant5819Ай бұрын
amazing explanation...i previously thought only hashset is enough but now I have got a new idea
@shhivanshhАй бұрын
Thanks a lot, tried to understand this topic from a few other videos but couldn't get down as clearly as you did.
@rohan8758Ай бұрын
Awesome explanation bhaiyan, Maja aa gaya approach dekh kr, Picked & Non-picked & I also learn how to skip the steps using any one variable. Thanks a lot bhaiyan
@MalaAgarwal-bo4hzАй бұрын
nicely explained
@lofireverbz-wy7goАй бұрын
nicely explained
@sourabhsharma2511Ай бұрын
very well explanation sir
@sachinvarma9949Ай бұрын
not working second ques in leetcode
@saurabhjain4226Ай бұрын
idhar udhar baat ghumaaye bina sateek samghaya hai. Thanks a lot sir!!! Kyu chote wale ko aage badha rahe main yhi smaghna tha aur wo aapne acche se samghaya.
@sanjaysuryaАй бұрын
Very bad explanation, why are you showing code first? Build logic step by step
@saurabhkukreja1982Ай бұрын
Bhai Neetcode se acha explain apne kiya h , You got a subscriber !
@sarthakmishra2462Ай бұрын
Bhaiya kya mai abhi apke dsa course me enroll kar sakta huu ❤❤.. Please reply 🙏 .. Please..
@sarthakmishra2462Ай бұрын
Please bhaiya
@sarthakmishra2462Ай бұрын
Bhaiya kya abb enroll kar sakte hai Please reply❤❤
Пікірлер
Thank you for the explanation.
thankss sirr! it cannot be this simple
Glt aa rh h answer
This is really helpful .Thanks for sharing such useful videos
public String stringShift(String s, int[][] shift) { int len = s.length(), totalAmountOfLeftShifts = 0, totalAmountOfRightShifts = 0; for(int[] move: shift) { if(move[0] == 0) totalAmountOfLeftShifts += move[1]; else totalAmountOfRightShifts += move[1]; } //max shifts you can do is len-1 totalAmountOfLeftShifts %= len; totalAmountOfRightShifts %= len; if(totalAmountOfLeftShifts > 0) s = s.substring(totalAmountOfLeftShifts) + s.substring(0, totalAmountOfLeftShifts); if(totalAmountOfRightShifts > 0) s = s.substring(len-totalAmountOfRightShifts) + s.substring(0, len-totalAmountOfRightShifts); return s; }
not working
can you explain bhaiya?
jounrey
see basically left will be moved till it finds a line greater than the right and vice versa right will be moved till it finds a line greater than left as a result min of left right is taken and mul with the length.(tip-area=l*b(or h)) therefore as L decrease h should increase
Some corrections public static ArrayList<Integer> duplicates(int[] nums) { // code here ArrayList<Integer> res = new ArrayList<>(); int f=0; for(int i =0;i <nums.length;++i) { int index =Math.abs(nums[i])-1; if(index>0){ if(nums[index] < 0){ res.add(Math.abs(nums[i])); f=1;} nums[index] = -nums[index]; } } if(f==0) res.add(-1); return res; } }
Thank you so much brother. helped today a lot
broo amazing
Nice codebix 🎉
Testcase pass ni hora😢
Thank you for make it simple
worst explanation
great explain
ismai yai formulas toh collage mai padhaya hii nahi hai 0(n2) yai syb
Very nice
lekin bhai wrong anser aa rha tha n^2 mein
Explanation was amazing , absolute perfection
Very nice explanation thank you for your efforts ❤❤❤
BEST EXPLAINATION
Thanks it was great
you are ezsnippet
Great
sir why are you not making new problems?
Thanks a lot it will help to many students
your voice made me wet (i am a guy)
wonderfull video
Awesomeeee ❤🎉
Thanks for making this video
If you get it 26:30 😅
Excellent explanation
Nice explanation bhaiyan!
amazing explanation...i previously thought only hashset is enough but now I have got a new idea
Thanks a lot, tried to understand this topic from a few other videos but couldn't get down as clearly as you did.
Awesome explanation bhaiyan, Maja aa gaya approach dekh kr, Picked & Non-picked & I also learn how to skip the steps using any one variable. Thanks a lot bhaiyan
nicely explained
nicely explained
very well explanation sir
not working second ques in leetcode
idhar udhar baat ghumaaye bina sateek samghaya hai. Thanks a lot sir!!! Kyu chote wale ko aage badha rahe main yhi smaghna tha aur wo aapne acche se samghaya.
Very bad explanation, why are you showing code first? Build logic step by step
Bhai Neetcode se acha explain apne kiya h , You got a subscriber !
Bhaiya kya mai abhi apke dsa course me enroll kar sakta huu ❤❤.. Please reply 🙏 .. Please..
Please bhaiya
Bhaiya kya abb enroll kar sakte hai Please reply❤❤
Very nice explanation sir
thanks
hands down the best recursion 1 shot