Count Sub Islands | Leetcode 1905
17:25
Ugly Number II | Leetcode 264
28:29
Пікірлер
@KR_Technical-hj3bf
@KR_Technical-hj3bf 6 сағат бұрын
Mam your voice sounds very similar to mine
@AbhinayShankhdhar
@AbhinayShankhdhar Күн бұрын
hey ayushi where are you from ?? and you are in which college ??
@studentkumar-f4t
@studentkumar-f4t Күн бұрын
C++ ka code nhi daalogi to etne hi views aayenge.
@AyushiSharmaDSA
@AyushiSharmaDSA 23 сағат бұрын
chalega, tum thodi mehnat krke chat gpt pe convert krlo :)
@studentkumar-f4t
@studentkumar-f4t 23 сағат бұрын
@AyushiSharmaDSA jaan sakta hoon ki python me kyu convert ho gayi ?
@studentkumar-f4t
@studentkumar-f4t 23 сағат бұрын
I mean , pahle to aap c++ me code karti thi.
@studentkumar-f4t
@studentkumar-f4t 23 сағат бұрын
@@AyushiSharmaDSA waise badhiya hai, Microsoft me kaam karne se en sab cheezo se fark nhi padta , Great 😃😃😃.
@studentkumar-f4t
@studentkumar-f4t Күн бұрын
C++ code ?
@AyushiSharmaDSA
@AyushiSharmaDSA 23 сағат бұрын
arey bhai chat gpt pe ye code daal kr c++ mein convert krlo. :)
@knowledgelocater06
@knowledgelocater06 Күн бұрын
If we start from the starting it will have same time complexity as start from the end. Why we should not choose 1st approach?
@anjaliChaudhary-tu1cd
@anjaliChaudhary-tu1cd 3 күн бұрын
Shouldn't it be returning i+1 because as we need the length
@PopcornPicksFlicks
@PopcornPicksFlicks 3 күн бұрын
link
@madhu_mohanreddy
@madhu_mohanreddy 3 күн бұрын
Thank you!!
@ali-wz6nz
@ali-wz6nz 3 күн бұрын
00:09 - Introduction to Gray Code and its unique properties. 00:56 - Gray Code differences and problem constraints. 01:42 - Introduction to binary representation and Gray Code generation. 02:39 - Constructing Gray Code for n equals 2 through binary additions. 03:36 - Exploring Gray Code generation for n equals 3. 04:33 - Gray Code sequences differ by one bit at each transition. 05:29 - Explains logic implementation for generating Gray Code values. 06:18 - Explains Gray Code generation by iterating through values in reverse.
@RajeshS-n2j
@RajeshS-n2j 4 күн бұрын
cool, nice explanation 😄
@prabhjeetsingh6305
@prabhjeetsingh6305 6 күн бұрын
very insightful for me.
@RajeshS-n2j
@RajeshS-n2j 6 күн бұрын
😄 cool solution
@CharleydeMeza
@CharleydeMeza 8 күн бұрын
my column indicator changed from A B C D to 1 2 3 4. How to change it back?
@shuvbhowmickbestin
@shuvbhowmickbestin 8 күн бұрын
Hey Ayushi, you said in one of your linkedIn posts that when you were targeting a switch one of the companies you were targeting was Visa. Visa doesn't give free food like Walmart does, is that not a cons that bothers you significantly? Cuz for some people food is indeed a big deal.
@AyushiSharmaDSA
@AyushiSharmaDSA 8 күн бұрын
hi, one of my friends is in visa and they do provide food afaik. :)
@shuvbhowmickbestin
@shuvbhowmickbestin 2 күн бұрын
@AyushiSharmaDSA is it free? I'll be joining them next month hence asking 😁
@RajeshS-n2j
@RajeshS-n2j 9 күн бұрын
nice explanation, I really like your dry run approach before code in almost all your uploads. Someone once said "If we cannot solve a problem by ourselves, don;t expect the computer to solve it for us", sounds like simple statement, but very true.
@AyushiSharmaDSA
@AyushiSharmaDSA 8 күн бұрын
Absolutely! It's all about breaking it down first. 😄
@ADITYAKUMAR-sd4zl
@ADITYAKUMAR-sd4zl 9 күн бұрын
THANKYOU SOO MUCH FOR PUTTING THAT MUCH EFFORT IN MAKING THIS SHEET , IT IS HELPING ME ALOT . HOPE TO MEET YOU ONE DAY INPERSON. YOU'RE AN INSPIRATION TO ME REALLY .
@AyushiSharmaDSA
@AyushiSharmaDSA 8 күн бұрын
Thank you so much, that’s so kind! 😊 glad this sheet is helpful, would love to catchup one day :)
@ADITYAKUMAR-sd4zl
@ADITYAKUMAR-sd4zl 8 күн бұрын
@@AyushiSharmaDSA I am working Diligently to come up the stage you're at , and looking ahead to learn under your mentorship as well 😊.
@AyushiSharmaDSA
@AyushiSharmaDSA 8 күн бұрын
@ you will go way ahead of me, keep learning and growing :)
@motion69
@motion69 10 күн бұрын
Nice method.
@nishantmishra135
@nishantmishra135 12 күн бұрын
In leetcode this is in easy section but here you have kept in hard why?
@UntamedRogueMavrick
@UntamedRogueMavrick 13 күн бұрын
I appreciate the solution, but unfortunately, it does not cover the scenarios where some nodes are unvisited neighbors. How will we handle that situation, and what will be the ordering of the traversal, all those possibilities are unanswered because of this specific case. The following scenario can help cover most of the scenarios: [[1,0],[0,3],[0,2],[3,2],[2,5],[4,5],[5,6],[2,4]]
@PAWANKUMAR-cu7gy
@PAWANKUMAR-cu7gy 14 күн бұрын
If You are Small Girl and Success Had A face
@Ron-er3bi
@Ron-er3bi 14 күн бұрын
Have you considered the fact that you are a girl
@rsh2192
@rsh2192 15 күн бұрын
like my comment
@amanshah1650
@amanshah1650 15 күн бұрын
working code with T=O(n) and S=O(1) int wiggleMaxLength(vector<int>& nums) { int n=nums.size(); if(n==1)return n; int i=1, prev_diff=0, cnt=1; //handling duplicate element edge case in start to calculate the prev_diff while(i<n&&prev_diff==0){ if(nums[i]-nums[i-1]!=0){prev_diff=nums[i]-nums[i-1];cnt++;} i++; } while(i<n){ if((prev_diff>0&&nums[i]-nums[i-1]<0)||(prev_diff<0&&nums[i]-nums[i-1]>0)){ cnt++;prev_diff=nums[i]-nums[i-1]; } i++; } return cnt; }
@maira-r4n
@maira-r4n 16 күн бұрын
Hi, This video is so helpful. Can you please create a video on top internships for students like me? I saw this Deconstruct ₹1L internship recently, and it got me interested in skincare-related internships.
@sereneguy1804
@sereneguy1804 16 күн бұрын
class Solution { public int myAtoi(String s) { //remove leading zeroes StringBuilder sb = new StringBuilder(s); while(sb.length()>0 && Character.isWhitespace(sb.charAt(0))){ sb.deleteCharAt(0); } if(sb.length()==0) return 0; boolean neg = false; char ch = sb.charAt(0); if(ch=='-'){ neg = true; sb.deleteCharAt(0); } if(ch=='+'){ sb.deleteCharAt(0); } StringBuilder sb2 = new StringBuilder(); for(int i=0; i<sb.length(); i++){ char ch2 = sb.charAt(i); if(ch2>='0' && ch2<='9'){ sb2.append(ch2); }else break; } if(sb2.length()==0) return 0; int res = 0; try{ res = Integer.parseInt(sb2.toString()); }catch(Exception e){ if(neg) return Integer.MIN_VALUE; else return Integer.MAX_VALUE; } if(neg){ res = -1 * res; } return res; } } Used exception handling for easy way out. lol
@Shubham-yc6nz
@Shubham-yc6nz 16 күн бұрын
Why does the for loop works? How can we guarentee that the case doesn't fail till gas.size -1? like what if the answer for first question was index = 4?
@yt_goluyadav
@yt_goluyadav 17 күн бұрын
nice
@Himani-t3g
@Himani-t3g 17 күн бұрын
i just wanna say one thing to you NEVER don't give up "tum karlogi yaar"
@debapratimsarkar3925
@debapratimsarkar3925 18 күн бұрын
how can these program achieve by java 8?
@k.a.8399
@k.a.8399 18 күн бұрын
I initially did the tot cost thinf but what i did was , took the diff and stored in gas[i] and then I check if sum of gas array is < 0 , I did this on my own and got amazed my original soln beat 15 % , but after video I got clicked that Oh, I do not need to check the whole circle if the previous indices are not ans , then upcoming must . Nice explanation . /*I have solved this question in O(n) but still it beats 15% , so I referred one yt video and to my surprise I brilliantly handled the edge case just that mine main loop needed a bit change . I was actually checking till cirucular loop if the ans is getting found , but the catch is that , for ex : firstly , we check whether the sum of diff <0 ; if yes then the ans is not at all possible . next , if its possible and index 0,1,2 are not starting points 4 and 5 must be there , so increment the start accordingly and whenver the case fails just increment the start . so , need not to check from start again . */ class Solution { public int canCompleteCircuit(int[] gas, int[] cost) { int sum = 0 ; int n = gas.length ; // int i=0 ; int start = 0 ; // int cnt = 0; int tot = 0; //firstly storing the difff . for(int k=0 ; k<gas.length ; k++){ gas[k] = gas[k] - cost[k] ; tot += gas[k] ; } //if tot < 0 , hence the circular track not completed . //OG statement , it helped me to solve the large testcases . if(tot < 0) return -1 ; // while(cnt != n && i < n ){ //cnt == n , tells the circle completed . && i == n tells the rejection is = to n . // if(sum + gas[start] >= 0){ // sum += gas[start] ; //storing sum . // cnt++ ; // } // else{ // cnt = 0 ; //reset sum and cnt . // sum = 0 ; // i++ ; // } // start = (start+1) % n ; //this avoids mess and cleanly handles the error . // } // if(cnt == n) return start ; //it means all stations visited and returned to same station(index) . for (int j = 0; j < n; j++) { sum += gas[j]; // If sum drops below zero, reset sum and update start to the next station if (sum < 0) { sum = 0; start = j + 1; } } return start % n ; //helps to avoid error if the starting point is the last index . } }
@cursegaming8031
@cursegaming8031 19 күн бұрын
ayushi didi me abhi 3rd semester me hu.mene abhi dsa padhna start kiya h me bhi aapke jaisa ek achi company me job karunga.....thank you didi for your videos me aapko har jagah follow krta hu.aaap meree liye motivation h bdi behen jaisi
@AyushiSharmaDSA
@AyushiSharmaDSA 19 күн бұрын
thank you, keep learning and I hope you get your dream job 🤗🫡🚀🎯
@shaiknayeem3277
@shaiknayeem3277 20 күн бұрын
Super
@AyushiSharmaDSA
@AyushiSharmaDSA 19 күн бұрын
Thanks 😊
@Charu-k2m
@Charu-k2m 20 күн бұрын
Lld
@Mr.coderrr108
@Mr.coderrr108 21 күн бұрын
Mam I want referral.... please can you help me if possible 🙏🙏
@AlokSingh-qj3hf
@AlokSingh-qj3hf 22 күн бұрын
chumma pdati ho app.
@AJnewsongstudio
@AJnewsongstudio 23 күн бұрын
Hlo didi, I am a 2nd year diploma student in mechanical engineering, main bhi vlogging karna chahta hu kyuki, mera confidence kuch acchha nahi hai so main improve karna chahta hu khudko, agar aap aur koi bhi jo ye comment padhara hai to kuch advice dena yr plzzz, waise mere paas kuch instruments bhi hai hai lekin fir bhi karna chahta hu.
@AyushiSharmaDSA
@AyushiSharmaDSA 22 күн бұрын
Hiii, vlogging ke liye bas you need a phone. And don’t worry others will think, just keep recording yourself and surrounding. Slowly slowly you will get more comfortable :)
@EktaMansha
@EktaMansha 23 күн бұрын
Hi ma'am, your knowledge is amazing. Can you make a video for college students like us for internhsip? I saw Deconstruct 1Lakh internship. Please explain more
@KumarMayank-f1b
@KumarMayank-f1b 23 күн бұрын
Link
@KumarMayank-f1b
@KumarMayank-f1b 23 күн бұрын
Lld
@kaustubhgaikwad2562
@kaustubhgaikwad2562 23 күн бұрын
I have taken your 1:1 session I paid the amount..you didn't even join the meet I'm still waiting This is not fair I kept a lot of hopes Needed your guidance Even after payment you are not showing up I don't even have words
@AyushiSharmaDSA
@AyushiSharmaDSA 23 күн бұрын
hi kaustabh, sorry for the inconvience, I got caught up in office meetings. I have sent reschedule link, if you wish to connect you can reschedule, else you can also cancel and get your money back
@kaustubhgaikwad2562
@kaustubhgaikwad2562 23 күн бұрын
@AyushiSharmaDSA I have rescheduled
@AyushiSharmaDSA
@AyushiSharmaDSA 23 күн бұрын
Kaustabh, I had to cancel the session since I’m not in town till 6th dec.
@kaustubhgaikwad2562
@kaustubhgaikwad2562 23 күн бұрын
@@AyushiSharmaDSA 😭😭😭
@kaustubhgaikwad2562
@kaustubhgaikwad2562 23 күн бұрын
@@AyushiSharmaDSA just half an hour. I came with lot of hopes
@ajay-2516
@ajay-2516 24 күн бұрын
Hi mam walmart me kisiko milne ke liye aa sakte he ya appointment lena padta he mam? Matlab unown person ko andar kisiko milneko aloud he mam?
@AyushiSharmaDSA
@AyushiSharmaDSA 24 күн бұрын
hi ajay, sometimes they check id cards at the tech park gates, but sometimes not. Anyway, you won't be able to enter any office floor of any company without id card.
@ajay-2516
@ajay-2516 24 күн бұрын
Ok mam @AyushiSharmaDSA Watchman ko jisse milna he naam bataya tho wuske bareme bata sakta he kya mam kab jane ka time puchke main wuska wait kar sakta hoon mam gate ke bhahar???
@ajay-2516
@ajay-2516 24 күн бұрын
Hi mam walmart me kisiko milne ke liye aa sakte he ya appointment lena padta he mam? Matlab unown person ko andar kisiko milneko aloud he mam?
@chalbeindori_IIITH
@chalbeindori_IIITH 25 күн бұрын
Best video dosttt 🎉
@AyushiSharmaDSA
@AyushiSharmaDSA 25 күн бұрын
@@chalbeindori_IIITH thanks dost :)
@RajeshS-n2j
@RajeshS-n2j 25 күн бұрын
I always find these backtracking recursion based problems hard to visualize, but your detailed black board explanation and walk-through makes it much easier for me.
@AyushiSharmaDSA
@AyushiSharmaDSA 19 күн бұрын
Glad to hear it was helpful 😄
@Satya-g5t
@Satya-g5t 25 күн бұрын
Yeah, these combinatorial problems are little challenging to understand, especially with recursion involved. But you have done a great job walking us through the steps patiently before getting into actual code. Nice. 😄
@AyushiSharmaDSA
@AyushiSharmaDSA 25 күн бұрын
@@Satya-g5t thank you, glad u liked it :)
@Enigma-fk7mh
@Enigma-fk7mh 26 күн бұрын
The reason why we are using the min heap because we want to pop the less frequent number not because its nlogn. Also if the question is asking for top less frequent number then we would use max heap because when we pop max heap the max frequent number will be popped