Lecture 20: Solving LeetCode/CodeStudio Questions [Arrays]

  Рет қаралды 483,872

CodeHelp - by Babbar

CodeHelp - by Babbar

Күн бұрын

Пікірлер: 702
@Lucrativesummon
@Lucrativesummon 2 жыл бұрын
Due to your help and guidance I have cleared Amazon SDE-1's coding round . Wish me luck for the interview .
@piyushsinha9989
@piyushsinha9989 2 жыл бұрын
all the best dude, btw you must have got the result, how was it?
@zackviper1901
@zackviper1901 2 жыл бұрын
?
@peterpace3379
@peterpace3379 2 жыл бұрын
@@piyushsinha9989 Rejected O_O
@rameshmalhotra9525
@rameshmalhotra9525 2 жыл бұрын
kzbin.info/www/bejne/qnK0en6bZbp6fpY
@itsmeakash_
@itsmeakash_ 2 жыл бұрын
Result DUDE ????
@rahulrastogi5312
@rahulrastogi5312 2 жыл бұрын
Feedback: Again I'm saying problem solving is this course's speciality which no other yt channel or resource has ..lage raho Bhaiya ji...sath me hain bilkul aapke 💯❤️
@aayushkhurana7810
@aayushkhurana7810 2 жыл бұрын
100 percent true
@RP-lf8ds
@RP-lf8ds 2 жыл бұрын
🔥🔥🔥💞💞
@rameshmalhotra9525
@rameshmalhotra9525 2 жыл бұрын
kzbin.info/www/bejne/qnK0en6bZbp6fpY
@Shivam_guru
@Shivam_guru 5 ай бұрын
not true
@durgashreenv8426
@durgashreenv8426 11 ай бұрын
32:50 for(int j=i; j
@rahulgoswami1161
@rahulgoswami1161 2 жыл бұрын
Small correction bhaiya 23:37 At line no - 32 it should be arr3[k++] = arr2[j++]; instead of arr2[k++] = arr2[j++];
@abhishekgaurav6928
@abhishekgaurav6928 Жыл бұрын
yes
@fuasteriskk
@fuasteriskk Жыл бұрын
yes i noticed it too but still the code ran flawlessly
@ankitbalotiyad-5915
@ankitbalotiyad-5915 Жыл бұрын
because array1 is larger then array2 here and counter consider i
@IT__AKASHSHUKLA
@IT__AKASHSHUKLA Жыл бұрын
yes you are right
@priyanshkumar17
@priyanshkumar17 Жыл бұрын
​@@fuasteriskkbecause the second loop didn't get executed for that particular sample test case
@nacxxj7184
@nacxxj7184 2 жыл бұрын
Personally a JS Learner, Learned C++ amd loved it, but there were less problem solving focused lectures in KZbin. This playlist of DSA series fullfills the issue. Thnx vaiya
@prathamsharma5190
@prathamsharma5190 11 ай бұрын
solved 2 questions of arrays first time by myself...thankx alot to u man this playlist is really a gem!
@aayushkhurana7810
@aayushkhurana7810 2 жыл бұрын
Present bhaiya . What you said about this course before start is Turning out to be 100 percent true . Keep going bhaiya. You are like our professor from money heist.
@abdulrehmaan153
@abdulrehmaan153 Жыл бұрын
waah kya comment hai yaar ~~~!!!
@yashsonune4391
@yashsonune4391 2 жыл бұрын
this playlist is destined to change the life of upcoming undergrads. Really thank you for what you have done for the cs community.
@atulkumar2417
@atulkumar2417 2 жыл бұрын
Bhaiya ab pata nahi but jyada maja ata hai approach ka intuition thora thora ane lagta hai . Thank you ❤️
@ariesgaming4580
@ariesgaming4580 Жыл бұрын
Reverse array vectorans; int i=0; int k=arr.size()-1; while(i
@laveshkhairajani5578
@laveshkhairajani5578 2 жыл бұрын
Q MERGE TWO SORTED ARRAYS class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { for(int i=0;i
@srajittanwar636
@srajittanwar636 2 жыл бұрын
Present sir ,array toh sab padhate h but bhaiya array ka postmortem karte h. Thank you bhaiya.Roz bas ese hi video ane dijiye.
@AmanSharma-tn3dy
@AmanSharma-tn3dy 2 жыл бұрын
Question1: void reverseArray(vector &arr , int m) { // Write your code here. int i = m+1; int j = arr.size()-1; int temp = -1; while(i
@atulkumarpandey3342
@atulkumarpandey3342 2 жыл бұрын
wah bhaiya samajh aa gya bahut asan ho gya aapke padhane ke baad isse pahle aisa lagta tha ki coding mere liye bani hi nhi hai lekin ab mja aa rha hai.Thanks bhaiya ❤
@AmanSharma-tn3dy
@AmanSharma-tn3dy 2 жыл бұрын
mja sa aa gya bhiya aaaj muje apka solution dekhne ki jrurt hi nhi pdi, khud se hi solve kr diye, abbb dhere dhere lg rha h amazon microsoft jase m selection ho jaeyga.. thanku you bhiya.
@prasadprashantb.4001
@prasadprashantb.4001 2 жыл бұрын
Iss chanel ko jo cheez sabse alag aur ekdum khaas aur effective banati hai vo hai real life problem solving practice jonki aur koi yt channel nhi krta that's the big+++ for this channel.... Keep it up bhaiya 👏👏🙌❤❤
@artifice_abhi
@artifice_abhi 2 жыл бұрын
In the second question merge two sorted arrays - 12:48 I used this approach class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { // removing zeroes for(int i = 0; i
@madanmohanpandey132
@madanmohanpandey132 Жыл бұрын
Very good approach
@BindassMHV
@BindassMHV Жыл бұрын
apni buddhi apne pas rakh bhaiya ko samjhane de
@rajnigarg8601
@rajnigarg8601 Жыл бұрын
Ye bhi sahi hai bs time complexity zyada hai iski
@ashishvinod2193
@ashishvinod2193 Жыл бұрын
O(n+m) hogai approach sahi hai but time complexity badh gai compare to o(n)
@ihateracistandblackpeople4272
@ihateracistandblackpeople4272 Жыл бұрын
​@@ashishvinod2193 bhai sorting ki bhi T.C. add hogi n + m to sitf shuru k 2 loop ki h
@aryanshah6393
@aryanshah6393 2 жыл бұрын
Bhai Yrr you totally nailed it.....All the questions asked in my Nagarro and TCS interview is from your series........Thanks Bhai :)
@VishalKumar-nh8jo
@VishalKumar-nh8jo Жыл бұрын
are u placed?
@vijaymaurya9755
@vijaymaurya9755 2 жыл бұрын
Maja aa gaya dekh ke bhaiya♥️ U r video improving my logic building …….. in this video i am able to think brute force approch ……thank you bhaiya ♥️
@dhir_tech
@dhir_tech 2 жыл бұрын
solid logic and industry level ki coding experience de rhe hai aap, paisa deke bhi nhi milta bhaiya , i mean kon Amazon ki job chhor ke hmko padhayega , u r great bhaiya time diya apne hum juniour ko thanku so much
@raj3718
@raj3718 2 жыл бұрын
What a consistency bhiyaa Aakho me neend ye phir bhi video bana rahe ho 🔥🔥🔥🔥 Explanation is on top
@BharatJaidiya-kw8nl
@BharatJaidiya-kw8nl 2 ай бұрын
bhai apka samjhane ka tarika kuch aisa hai jaise ki nurssary ke bache ko abcd sikhaya ja rha hai , op explanation , all clear , love babbar OP
@kishansingh6510
@kishansingh6510 2 жыл бұрын
Q1 Reversing an array after m position --> #include #include using namespace std; vector reverse(vectorv){ int s=v.front()+2,e=v.size()-1; //here m=3 i.e., change array after 3rd position while(s
@parthshinde3636
@parthshinde3636 2 жыл бұрын
void reverseArray(vector &arr , int m) { // Write your code here. int start=m+1; int end=arr.size()-1; while(start
@I_Anupam_Pandey
@I_Anupam_Pandey 2 жыл бұрын
Feedback: Kindly also discuss the solution of the previous class homework in the next video hit like if you agree
@15priyanshupratapsingh24
@15priyanshupratapsingh24 2 жыл бұрын
what is the point of giving homework if we have to discuss it in the lecture
@111rhishishranjan2
@111rhishishranjan2 2 жыл бұрын
@@15priyanshupratapsingh24 because kid every problem can be solved in many ways ,By seeing best solution u get better idea, u can compare with your solution to see which code is better in terms of length and time complexity and in this way u will learn a lot
@abdulrehmaan153
@abdulrehmaan153 Жыл бұрын
bhai jaake discussion me check krona yaar
@shiv.shankar
@shiv.shankar Жыл бұрын
@@abdulrehmaan153 Kaunse discussion mai? If you are talking about Discord ka discussion then wahaan pe kaunse channel mai discuss hoti hai homework problems?
@bossnation8921
@bossnation8921 Жыл бұрын
​@@shiv.shankarAre coding platform ke discussion me
@she_Reads1908
@she_Reads1908 2 жыл бұрын
you're the best sir. I really had a hard time learning coding and solving problems. But you have made everything so easy.
@dhruvikmevada5155
@dhruvikmevada5155 2 жыл бұрын
if at the non zero index value is non zero then this code will be wrong example:arr[]={2,0,1,2,0,3,0} solution: #include #include using namespace std; vector reverse(vector,int); void print(vector); vector reverse(vectorv,int i){ for(int j=i+1;j
@dhruvikmevada5155
@dhruvikmevada5155 2 жыл бұрын
you are so cute and beautiful🙂😊
@KaiCenatLOLClips
@KaiCenatLOLClips 2 жыл бұрын
@@dhruvikmevada5155 bsdk padhle \
@shi-nee7966
@shi-nee7966 2 жыл бұрын
@@KaiCenatLOLClips bhai bande ne pehle ans bhi reply mai kiya fir likha 🤣
@KunalKumar-tp1cc
@KunalKumar-tp1cc 2 жыл бұрын
25:44 Homework code: class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { int i=0, j=0, k=0; vector nums3; while(i
@amanranjan2684
@amanranjan2684 Жыл бұрын
thx bro
@Avinas_h_7
@Avinas_h_7 Жыл бұрын
thx
@omprakashtiwari1412
@omprakashtiwari1412 10 ай бұрын
There is mistake in this inside while loop the condition for i should be i
@calisthenics5247
@calisthenics5247 8 ай бұрын
​@@omprakashtiwari1412No bro if you look at the question value of m denotes the number of elements present in nums1 excetpt the empty space denoted by zero
@tusharsoni2450
@tusharsoni2450 4 ай бұрын
what's the need of k iterator in this?
@devanshsk7222
@devanshsk7222 2 жыл бұрын
Solved all questions in 1st try by myself. Ab to confidence aane laga h.
@rajvishwakarma5672
@rajvishwakarma5672 2 жыл бұрын
void merge(vector& nums1, int m, vector& nums2, int n) { for( int i=m, j=0; i
@AbhishekKumar-nz9dn
@AbhishekKumar-nz9dn 2 жыл бұрын
nice
@vivekswami2182
@vivekswami2182 2 жыл бұрын
nice
@aashitAgrawal
@aashitAgrawal 2 жыл бұрын
nice
@manishbhadane4198
@manishbhadane4198 2 жыл бұрын
bro great code samja sakte ho kya kese run ho raha hai ye.....
@amitshukla2268
@amitshukla2268 2 жыл бұрын
Bhaiya kuch samay baad inn videos ke views millions me honge , thnx a lot bhaiya 🔥🔥🔥
@NotTheFakeRahul
@NotTheFakeRahul 2 жыл бұрын
19:50 we can add INT_MAX at the end of both arrays, this way we can avoid writing two extra while loops for remaining elements!! thank you Babbar Bhaiya for teaching us so well!
@yashahuja1550
@yashahuja1550 Жыл бұрын
how? bro can u explain
@AbhinavPt
@AbhinavPt 9 ай бұрын
but then you will also end up adding the int_max values, in the last position in the new array, since they are also elements of your array
@vivekrai2305
@vivekrai2305 2 жыл бұрын
Bhaiya please make more nd more videos on only problem solving.... Becoz these videos helps to improve logics and also tells that how to approach a problem and how to think about particular problem ❤️❤️
@surajgupta-bc8lq
@surajgupta-bc8lq 2 жыл бұрын
Yess i agree with you 😊
@saumitramuley5170
@saumitramuley5170 2 жыл бұрын
Thank you bhaiyya for couse and giving motivation and confidance This couse is just next level far better than any cource in india ❤️
@manaskumarpanda3343
@manaskumarpanda3343 2 жыл бұрын
Bhaiya BINARY SEARCH aap se padatha to aaj practical exam mein ka 45 min ka paper ko 6 min mein kardia LOVE YOU BRO.❤❤
@ArchitYadav-vm3tv
@ArchitYadav-vm3tv Жыл бұрын
class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { for(int i=0;i
@yashmishra47
@yashmishra47 2 жыл бұрын
You teach really well , really waiting for the trees data structures as that is my weakest part and I really struggle to solve even a single tree question.
@CodeHelp
@CodeHelp 2 жыл бұрын
ekdum makhhan lagega trees toh, jab karwaenge
@ashishtomer9962
@ashishtomer9962 2 жыл бұрын
@@CodeHelp ​ Thanks for all the content and this course. One request though: Please don't post content everyday. It's getting harder to keep up. Every other day is fine.
@amitshukla2268
@amitshukla2268 2 жыл бұрын
bhai love bhaiya ne kha hai iss pace se chlega tabhi jake 17 march tak course khtm hoga so plz chalne do :)
@kailashdaata8610
@kailashdaata8610 2 жыл бұрын
@@CodeHelp plz try to continue language independent course as you are doing now,. so if somebody wants to solve in java/python they can do.
@259_parthpatidar9
@259_parthpatidar9 2 жыл бұрын
@@ashishtomer9962 din raat ek krdo
@umashankerpanday77
@umashankerpanday77 2 жыл бұрын
Bs bhaiya ese basic se utha ke le chalo thanku very much bhaiya ..........I am from tier 3 college but from your course I will crack the off campuses..... Bs bhaiya level basic se hi leke chlna
@randomavghuman
@randomavghuman 10 ай бұрын
for second question, just add the nums2 to nums1 after nums 1 ends, then simply use insertion sort in the whole nums 1, itll give the fastest result in leetcode. here we dont make another array and convert nums1 to that array so it does save time class Solution { public: void merge(std::vector& nums1, int m, std::vector& nums2, int n) { for(int i=0;i= 0; j--) { if (nums1[j] > temp) { nums1[j + 1] = nums1[j]; } else { break; } } nums1[j + 1] = temp; } } };
@IslamEcho
@IslamEcho 10 ай бұрын
Thanks Brother
@IslamEcho
@IslamEcho 10 ай бұрын
you can also try this one class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { int i = m - 1; int j = n - 1; while (i >= 0 && j >= 0) { if (nums1[i] > nums2[j]) { nums1[i + j + 1] = nums1[i]; i--; } else { nums1[i + j + 1] = nums2[j]; j--; } } while (j >= 0) { nums1[j] = nums2[j]; j--; } } };
@bananipanja2704
@bananipanja2704 2 жыл бұрын
I never comment on Bhaiya's videos as I'm currently on video 9 (yeah lagging behind) but today i had to....kyunki kal raat sapne mein bhi dekh rhi hoon mein code kar rhi hoon(for loop ye sabb)... pta nhin Love Bhaiya comment dekhenge ya nhin...But had to share this... thanks bhaiya itna accha dsa course kliye❤️❤️❤️
@CodeHelp
@CodeHelp 2 жыл бұрын
Sapne me bhi DSA wow dedication 😳
@bananipanja2704
@bananipanja2704 2 жыл бұрын
@@CodeHelp 😂😂😂...ss le rhi hoon aapke reply ka🥺...thanks a lot
@codusiast5401
@codusiast5401 2 жыл бұрын
@@bananipanja2704 phir compilation error aate he neend khul gayi hogi 😅😅
@prateekshrivastava2802
@prateekshrivastava2802 2 жыл бұрын
Qn 2 my solution : -- class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { for(int i=0;i
@Engineering_Unlocked
@Engineering_Unlocked Жыл бұрын
to all the guys who thinks why we done use use reverse here we can use that also but for understanding us the concepts bhaiya told us that we can also used reverse(a[m+1],a[end]);
@tanmoybiswas6048
@tanmoybiswas6048 Жыл бұрын
Maza agaya bhaiya. im in 4th sem right now from kolkata. im from a tier 4 college ,watching your lectures and solving problems to make my base strong from scratch. thanks for everything you did. and wish you well for your health. waiting for your web dev videos. im making promise that im gonna be more consistent and get myself placed in a good company. baas apka saath ho and i will follow your guided path. pranam lijiye bhaiya.🙏
@divyeshmavadiya6310
@divyeshmavadiya6310 2 жыл бұрын
Ek dum se maja aa gaya bhaiya and End sem chal rahe he but...... aap lage raho hum time nikal ke bhi kar lege bus aapki video aani chahiye ......................Love from Gujarat
@oflyrics3477
@oflyrics3477 2 жыл бұрын
Try this For (int i=0;i
@saurabhsinha5639
@saurabhsinha5639 2 жыл бұрын
Bhaiya kyuki ye vector h to simply ye bhi kr sakte h kya? int j=0; for(int i=m;i
@MohanSingh-rj3td
@MohanSingh-rj3td 2 жыл бұрын
coding is beauty when someone like yyou is there to help us.
@harjaspreetsingh3592
@harjaspreetsingh3592 2 жыл бұрын
bhaiya merging wale question me aapne normally merg krke sort krna kyu nahi prefer kia int s=m,e=m+n; int index=0; while(s
@ankitpanchal7554
@ankitpanchal7554 2 жыл бұрын
1st HomeWork done: class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { int i= m; int j =0; while(j
@anandtiwari8606
@anandtiwari8606 2 жыл бұрын
Bhaiya third question mein hum ek aur array bana kar usme sare elements ko initially 0 lenge aur ek loop chala denge aur ek aur agar array 1ka element positive hua to use second array mein daal denge ek he loop ka use krke aur hamesha array2[j] j ko j++ krte rhenge agar use update kre to
@virajdeshpande9821
@virajdeshpande9821 2 жыл бұрын
Time Stamp 25:44 Re: Homework The way to think about the solution is that we will have to do a reverse sorting. We initialize k=m+n-1 as that will be the last location of nums1. We will keep checking for the greater element of the two arrays(i=m-1,j=n-1) and insert the values. nums1 = [1,2,3,0,0,0], m = 3 nums2 = [2,5,6], n = 3 nums1 = [1,2,3,0,0,0] | | i k nums2 = [2,5,6] | j nums2[j]>nums1[i] thus nums1[k]=6 k and j are decremented. nums1 = [1,2,3,0,0,6] | | i k nums2 = [2,5,6] | j nums2[j]>nums1[i] thus nums1[k]=5 k and j are decremented. nums1 = [1,2,3,0,5,6] | | i k nums2 = [2,5,6] | j We keep following up this procedure and we get the desired reult. void merge(vector& nums1, int m, vector& nums2, int n) { int i=m-1,j=n-1,k=m+n-1; while(i>=0&&j>=0) { if(nums1[i]>nums2[j]) { nums1[k]=nums1[i]; i--; k--; } else { nums1[k]=nums2[j]; j--; k--; } } while(i>=0) nums1[k--]=nums1[i--]; while(j>=0) nums1[k--]=nums2[j--]; }
@shreetejsanap1706
@shreetejsanap1706 2 жыл бұрын
Good Work Brother
@rahultaparia1206
@rahultaparia1206 2 жыл бұрын
Thank you brother
@rangamdeka6178
@rangamdeka6178 2 жыл бұрын
Why can't we do that problem the way we did the normal merge 2 sorted arrays problem in the video?
@aditya-9431
@aditya-9431 2 жыл бұрын
@@rangamdeka6178 It can be done. Space complexity is increasing. ig, it was given in the solution section of leetcode.
@priyanshurawat5245
@priyanshurawat5245 2 жыл бұрын
@@aditya-9431 yess so true...
@_washim_45
@_washim_45 2 жыл бұрын
H.W. 25:44 void merge(vector& nums1, int m, vector& nums2, int n) { nums1.resize(m); for(int i=0;i
@salonitandon2411
@salonitandon2411 Жыл бұрын
can you explain this please?
@babarockgaming8967
@babarockgaming8967 Жыл бұрын
Thank you bhaiya Deep down my heart u r one of my favourite teacher of my life
@balmukundtiwari7963
@balmukundtiwari7963 2 жыл бұрын
Kindly check line no 26 @ 25:35 it should be arr3[k++]=arr2[j++];
@AaBb-zd5gk
@AaBb-zd5gk 2 жыл бұрын
Yes baad me correct kr lia bhaiya ne
@priyamtiwari391
@priyamtiwari391 2 жыл бұрын
yup this is a mistake
@sureshmakwana8709
@sureshmakwana8709 2 жыл бұрын
@@AaBb-zd5gk nope nahi kiya
@sureshmakwana8709
@sureshmakwana8709 2 жыл бұрын
@@priyamtiwari391 yeah I wrote code by myself then saw on screen that y has he written that😂
@techtrap4670
@techtrap4670 2 жыл бұрын
void reverseArray(vector &arr , int m) { // Write your code here. int e=arr.size()-1; for(int s=m+1;s
@saketsrivastava1424
@saketsrivastava1424 2 жыл бұрын
Thank you for this placement series Bhaiya We're learning and enjoying a lot.
@sciencestreamers8509
@sciencestreamers8509 2 жыл бұрын
Yaar kitna achey se smjhate ho aap 😀
@lokeshwarprasad9614
@lokeshwarprasad9614 Жыл бұрын
You teach really well ,Really thank you for what you have done for the cs community.
@vivekr1169
@vivekr1169 2 жыл бұрын
Bhaiya sach me aapke vajh se samjh gaya itna bas ab practice karna hai thanku bhaiya🙏
@AbhishekSingh-gr6zr
@AbhishekSingh-gr6zr Жыл бұрын
merge sorted array solution class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { nums1.resize(m); for(int i=0;i
@vijaiganeshh1346
@vijaiganeshh1346 8 ай бұрын
28:48 Use bubble sort and if arr[j] == 0 swap this moves zeroes to last
@nadiyaparweenkainaat
@nadiyaparweenkainaat 11 ай бұрын
void merge(vector& nums1, int m, vector& nums2, int n) { for (int j = 0, i = m; j
@asmitsrivas
@asmitsrivas 2 жыл бұрын
Lecture 20 - completed Homework 26:38 class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { int i = 0, j = 0,k=0; int nums3[m+n]; while(i
@I_Anupam_Pandey
@I_Anupam_Pandey 2 жыл бұрын
This way we can solve but in question, it is given without making any third vector or array. do you know any other method
@GauravJadhav-ml2my
@GauravJadhav-ml2my 2 жыл бұрын
hii, last mein for loop kyu lagaya hai
@aazamali2081
@aazamali2081 Жыл бұрын
@@GauravJadhav-ml2my kiuki usne bola h ki answer nums1 m store krna h isliye
@godl_disaster611
@godl_disaster611 Жыл бұрын
just use single loop int mergesort = m ; for(int i = 0 ; i < n ; i++){ nums1[mergesort++] = nums2[i]; } And sort the array 😁
@aaravkumar1308
@aaravkumar1308 2 жыл бұрын
U are maahan bhaiya 🔥🔥 aisa couurse paise deke bhi naa milta 🥺🥺🔥🔥
@priyanshubasu2092
@priyanshubasu2092 2 жыл бұрын
class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { for(int i=0;i
@rajasinghrajpoot8626
@rajasinghrajpoot8626 2 жыл бұрын
Bhiaya krpa krke agr video ke last me, upcoming video ka bhi topic bta de to badi mehrbani rhegi...Dhanyawad
@aashishrangdal9614
@aashishrangdal9614 2 жыл бұрын
Multi-dimensional Array And Matrix Pr Bhi Solutions Lecture Banao Bhaiyaa..!!😶😶
@iam_yash1
@iam_yash1 2 жыл бұрын
bhaiya aaj (30/06/2022) ko c++ stl or ye wali video dekh li hai, thankyou for this course bhaiya🙏🏻
@niteshsaxena1066
@niteshsaxena1066 Жыл бұрын
bhaiya the approach you have taught in homework question is very long and honestly not required, this can simply be done by adding all the elements of second array into first array and then sorting the array, this will return the required answer, there is no need to add elements checking every element one by one and then adding
@tejashmaurya2149
@tejashmaurya2149 Жыл бұрын
other way of reverse array #include using namespace std; void reverse(int arr[], int n) { int start = 0; int end = n-1; while(start
@Anupkumar-bg7kr
@Anupkumar-bg7kr 2 жыл бұрын
Bhaiya plz contest ke question ko explain kr digyge last ke 2 question aache se samjh nhi aa rhe ha. BTW loving your course bhaiya.
@kamla783
@kamla783 2 жыл бұрын
Solving Questions at Leetcode && at Codestudio has Motivate Me alot 🔥🔥
@rasid_khan
@rasid_khan 2 жыл бұрын
Bhaiya exam khatam hone ke baad 1 week deke 20 videos khatam kar diya... Ab saath saath chalenge 🧡🧡🧡 Thank you for this amazing course🔥🔥🔥🔥🔥
@PoojaYadav-qt6bd
@PoojaYadav-qt6bd 2 жыл бұрын
Aatankwadi tu office me boom hi laga dega
@ayushraj1346
@ayushraj1346 2 жыл бұрын
Bhaiya isme hum merge wale me Hum ye bhi logic laga sakte hai ki eek vector bana lenge aur usme pahle wale array ke element ko dal denge phir dusere wale array ke element ko aur phir sort krr denge STL laga ke...
@musqitonebeats2129
@musqitonebeats2129 2 жыл бұрын
25:44 Homework, it is self explanatory class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { int i=0; int j=0; vectorans; while(i
@AbhishekKumar-hg5gv
@AbhishekKumar-hg5gv 3 ай бұрын
for(int j=0, i=m ; j
@balkaran8458
@balkaran8458 2 жыл бұрын
merge sorted array class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { for(int i=0;i
@riyaprajapati9951
@riyaprajapati9951 3 ай бұрын
Done!!❤ This is the best course i have ever seen!! Thank you soo much sir!
@sachinaghera8189
@sachinaghera8189 2 жыл бұрын
23:20 there is error. It should be arr3[k++]=arr2[j++];
@anuragverma9799
@anuragverma9799 2 жыл бұрын
not in VS
@manthanchouhan8560
@manthanchouhan8560 2 жыл бұрын
Catch up🙌
@ece_49_kirtivardhansingh18
@ece_49_kirtivardhansingh18 Жыл бұрын
True
@badalkamli7816
@badalkamli7816 Жыл бұрын
Yeah, and it is left unnoticed because for our sample input that while loop never got executed.
@ece_49_kirtivardhansingh18
@ece_49_kirtivardhansingh18 Жыл бұрын
Yess obviously...that's why for this particular example code has runned smoothly
@abdulrehmaan153
@abdulrehmaan153 Жыл бұрын
I personally loved the merge two sorted arrays prob coz it made me ponder for a while lot longer and made me look like a fool in front of myself,... a pretty odd comment but it let's me hit off some air and let's others resonate and feel good bout themslvs
@_SahilShah
@_SahilShah 2 жыл бұрын
Marked the attendance!💯 Commeting for better reach!👊🏽
@yashchauhan7221
@yashchauhan7221 2 жыл бұрын
Attendence done will watch after previous video 🔥
@shashinibhat8989
@shashinibhat8989 2 жыл бұрын
I was looking for a well structured dsa course and this is helping a lot❤
@VishalKumar-nh8jo
@VishalKumar-nh8jo Жыл бұрын
r u placed?
@therealartist9
@therealartist9 10 ай бұрын
bhaiya logic to aap pura wait karke ache se samjhate ho par jab code karte ho to speed mai bhagate hue chalte ho jisse codes ki kai sari lines samajh nhi aati , agar code hi samajh ni aya to logic jankr kya karenge bhaiya
@radhikakhandelwal4047
@radhikakhandelwal4047 2 жыл бұрын
Bhaiya dekh li video! Mazza aa gaya..... Homework done!
@jogindrasingh6139
@jogindrasingh6139 2 жыл бұрын
bhaiya vomerge 2sorted array wale question mein ek galti hai saayad usme apne arr2[ k++]=arr2[j++] likh diya balki arr3[k++]=arr2[j++] aana chaiye saayad and once again thankyou for this dsa course (dhanyavaad)
@cat-codes1on1
@cat-codes1on1 2 жыл бұрын
bhaiya aaj ke lecture me mazaa aa gya dono h.w. khud se brainstorming karke kar liye class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { int j = 0; for(int i = m; i < m+n; i++){ nums1[i] = nums2[j]; j++; } selectionSort(nums1,m+n); } void selectionSort(vector& nums1,int size){ for(int i = 0 ; i < size-1 ; i++){ int minIndex = i; for(int j = i+1; j < size ; j++){ if(nums1[j]
@abhijitmondal2172
@abhijitmondal2172 2 жыл бұрын
vaiya aj to maja agaya...out of 3 i solved 2question.. also i build the logic...thank you so much for your priceless effort.. lots of love from kolkata.
@_tan2112
@_tan2112 2 жыл бұрын
All the 20 videos payoff when you are watching 21th and getting each and everything . Respect to LOVE BABBER
@sy_02_vaibhavavdhut98
@sy_02_vaibhavavdhut98 7 ай бұрын
In Question2 -> we can directly add elements of arr2 in arr1 and then simply use sort
@PrathamChawla-y5w
@PrathamChawla-y5w Жыл бұрын
Q3 -- > Thanks babbar sir :) class Solution { public: void moveZeroes(vector& nums) { int i = 0; int j = i; while(j
@aditya_raj.ori0
@aditya_raj.ori0 8 ай бұрын
Question 2 : 25:27 bhaiya kya ye ek acha solution hai ye nhi void mergeSort(vector &arr1,int n, vector &arr2,int m, vector &arr3){ int i = 0; int j = 0; while (i < n || j
@jagmohanrai2714
@jagmohanrai2714 Жыл бұрын
Practical implimentation best thing thanks bhaiya.
@poojayadav695
@poojayadav695 2 жыл бұрын
Attendance ✅ Videos roj upload kro bhaiya hum dekh rahe h daily videos
@rahulanand1075
@rahulanand1075 2 жыл бұрын
Bhaiyaa artist wale gloves le lo.... jisme last 2 fingers hi cover hoti hai sirf.... easy padega ipad pr likhne me, paseena lagne ka bhi darr nhi hoga
@Aditya-ic5vo
@Aditya-ic5vo Жыл бұрын
25:44 Homework class Solution { public: void merge(vector& nums1, int m, vector& nums2, int n) { int i=0,j=0,k=0; vector nums3=nums1; while(i
@mohammadmuzaffarhyder8828
@mohammadmuzaffarhyder8828 2 жыл бұрын
Bhaiya aap macha rahe ho ,dsa ki duniya ka kingkong
@amantarar9077
@amantarar9077 2 жыл бұрын
BHAIYA,contest waale questions videos me explain krdiya kro,extra practice hojaegi plzz,yaa fir jin bchoon ne contest me acha perform kiya hai unki help leke solution video bnwado please😌😌
@BerozgarAt25
@BerozgarAt25 2 жыл бұрын
hamesha ki tarah ek aur lazwaab video lage raho bhaiyya ham bhi hain bhaiyya
@rishabhroy8925
@rishabhroy8925 2 жыл бұрын
Bhaiya sahi feel aa rahi hai. Please leetcode ke zyaada questions karvao.
@prashantmaurya6868
@prashantmaurya6868 2 жыл бұрын
Thanku soo muchh bhaiya ya strategy unique aur sabsee bestt hai aap padhai k saath acche platform k questions bhi kara rahe thanku soo much bhaiya #PlacementHogiApni
Lecture21: Solving LeetCode/CodeStudio Questions [Arrays]
33:32
CodeHelp - by Babbar
Рет қаралды 464 М.
Lecture19: C++ STL in 1 Video (Re-Uploaded)
1:01:51
CodeHelp - by Babbar
Рет қаралды 838 М.
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 1,2 МЛН
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
Disrespect or Respect 💔❤️
00:27
Thiago Productions
Рет қаралды 38 МЛН
Merge Sorted Arrays Without Extra Space | 2 Optimal Solution
32:47
take U forward
Рет қаралды 213 М.
I Solved 100 LeetCode Problems
13:11
Green Code
Рет қаралды 223 М.
Lecture22: All about Char Arrays, Strings & solving LeetCode Questions
1:53:20
CodeHelp - by Babbar
Рет қаралды 1,1 МЛН
2nd year student cracks Paypal | Off-Campus selection | + PPI
31:29
Apna College
Рет қаралды 197 М.
Lecture 23: Introduction to 2D Arrays in C++ || LeetCode Questions
1:30:36
CodeHelp - by Babbar
Рет қаралды 632 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 557 М.
Merge Sorted Array - Leetcode 88 - Python
10:18
NeetCode
Рет қаралды 231 М.
American Airlines | Stand Up Comedy | Ft  @AnubhavSinghBassi
4:54
be_a_bassi
Рет қаралды 4,2 МЛН
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 1,2 МЛН