Merge two sorted Arrays into a third Sorted array

  Рет қаралды 118,479

Vivekanand Khyade - Algorithm Every Day

Vivekanand Khyade - Algorithm Every Day

Күн бұрын

Пікірлер: 192
@JAI-cf2xt
@JAI-cf2xt 22 күн бұрын
Very clear explanation sir.. The way you explain the concept makes me understand the logic of the program in the clear manner... Thanks a lot
@MrKabutoSN
@MrKabutoSN 4 жыл бұрын
I had been trying to solve this problem all day long, thank you so much for the explanation!
@jahzielperalta484
@jahzielperalta484 3 жыл бұрын
same here ;-;
@kumarsaireddyseelam1999
@kumarsaireddyseelam1999 3 жыл бұрын
Same 😀
@1000mantinis
@1000mantinis 2 жыл бұрын
sam
@riyanshsrivastav5107
@riyanshsrivastav5107 Ай бұрын
Very cleanly explained sir Thank you very much
@nimmisinha2418
@nimmisinha2418 7 ай бұрын
Very clearly explained.. I was looking for this kind of. No constraint that both array of same size. Thank you so much
@nguyenduythai4149
@nguyenduythai4149 2 жыл бұрын
Your explanation is sooooo good. I tried to solve this problem for the entire day and then I saw this vid.
@yoshitamahajan353
@yoshitamahajan353 3 жыл бұрын
Thank u so much bcoz of u I finally understood coding for merger sort..
@aksharaverma6452
@aksharaverma6452 3 жыл бұрын
best ever explanation!!!😍 crystal clear concept.. Thankyou very much sir!!
@wendymcdonald7351
@wendymcdonald7351 2 жыл бұрын
This is an amazing walkthrough of the process 😀 Thank you!
@Man-if5xt
@Man-if5xt 6 жыл бұрын
Thoroughly explained as always. Thank you!
@mahahrishi
@mahahrishi 5 жыл бұрын
It is a Great job, which you are doing!.. Keep Sharing
@pooja2023
@pooja2023 6 жыл бұрын
Tomorrow is my exam and I faced a lot of problem in this program but after watching this video everything is clear .
@subhajitchowdhury9453
@subhajitchowdhury9453 4 жыл бұрын
🙄🙄🙄
@tapanjeetroy8266
@tapanjeetroy8266 5 жыл бұрын
Thanks for uploading it.. You are doing a great job.. Please upload more videos of competitive programming.. We really need it
@dhritika-j2t
@dhritika-j2t 2 ай бұрын
thank you sir for such a good explanation. I'm finally able to understand all these questions.
@antoniskelekis2286
@antoniskelekis2286 5 жыл бұрын
Some of my friends asked who is this guy talking like this, i said he is the one who helped me under stand how to solve the problem you didnt. :/
@babacarmane5434
@babacarmane5434 2 жыл бұрын
Thanks you from Senegal ❤❤❤ God bless you
@ThePhani2585
@ThePhani2585 6 жыл бұрын
nice explanation.Plz do continue posting videos...
@sudharsanprabu
@sudharsanprabu 4 жыл бұрын
I think you will have to add a condition for both elements being equal. In that case copy the value and increment i, j and k.
@radheshyampatel9203
@radheshyampatel9203 3 жыл бұрын
no that condition is not required because condition evaluates to true or false in this case it will evaluate to false which is correct logicaly
@kunalkashyap5737
@kunalkashyap5737 3 жыл бұрын
Thanks I was stuck from last three hour and you made me solve this in just few minutes thanks
@ukdas6674
@ukdas6674 4 жыл бұрын
very very very thanku sir u r great u passed successfully explaining this complicated topic in too too simple manner......thanku so much
@seekersofwisdom85
@seekersofwisdom85 2 жыл бұрын
very well explained boss. thanks
@moodswingsoflife
@moodswingsoflife 3 жыл бұрын
Nice work... nicely explained..thanks sir
@pritishpattnaik4674
@pritishpattnaik4674 3 жыл бұрын
good implementation of 2 pointer approach
@dantewhite1818
@dantewhite1818 5 жыл бұрын
its like a light just beamed down on my had wow so impressive thanks for this awesome vide you absolutely rock for this thanks for explaining what happens at each interval thanks thanks thanks thanks thanks thanks thanks thanks thanks
@enigmaticgale7436
@enigmaticgale7436 4 жыл бұрын
same here..
@parthsatvekar5411
@parthsatvekar5411 2 жыл бұрын
Good explaination sir,helped a lot thankyou
@anantabuddha4426
@anantabuddha4426 5 жыл бұрын
this video like ayurvedic medicine for me, amazing sir. thanks for this video
@dbtfitness8655
@dbtfitness8655 2 жыл бұрын
Great explaination sir you are making me understand DSA very well thankyou need new updates
@akhintheruvath
@akhintheruvath 3 ай бұрын
Great explanation🙌
@raeesakhan8562
@raeesakhan8562 2 жыл бұрын
clear and best explanation
@akeelmunshi7661
@akeelmunshi7661 5 жыл бұрын
You can achieve same using || condition in while loop and check first if condition as i
@dhurgeswaran3884
@dhurgeswaran3884 3 жыл бұрын
Superb explanation
@arjunkannan5178
@arjunkannan5178 4 жыл бұрын
Thanks so much for many time iam tried to under this but i can't But this vedio is very help full for me 😘❤
@3214lifelol
@3214lifelol 9 ай бұрын
This was such a good explanation!
@ratneshchandravanshi2069
@ratneshchandravanshi2069 6 жыл бұрын
your explanation way is very fantastic thank you sir
@494venkatraja4
@494venkatraja4 4 жыл бұрын
sir,i have this doubt what should we do if we encountered the situation where where we have two same numbers ...?.
@garimaverma8345
@garimaverma8345 5 жыл бұрын
Such a great explanation! Thank you.!
@shubhamkalravevo1884
@shubhamkalravevo1884 4 жыл бұрын
Would you like to donate your hair...we cud pay you in cash
@04.nehalsingh12
@04.nehalsingh12 2 жыл бұрын
awesome tutorial sir
@bradsinclair3640
@bradsinclair3640 2 жыл бұрын
Great video!!!
@likhithsasank8017
@likhithsasank8017 2 жыл бұрын
Best explanation sir 🔥😀..Thanks a lot sir for these solutions ❤️
@mcdonald9584
@mcdonald9584 3 жыл бұрын
I love you and thank you bro 🤧🤧 Finally i understand so clearly
@virnus1
@virnus1 Жыл бұрын
Will it work if arrays have same elements?
@nidhikumari1202
@nidhikumari1202 4 жыл бұрын
Mast samjae re baba ...dimag chamk gya 😘😘😘❤❤
@moodswingsoflife
@moodswingsoflife 3 жыл бұрын
Nicely explained
@lalitvats9862
@lalitvats9862 2 жыл бұрын
Very easy explanation ! thank you 😍🤩
@SmartProgramming
@SmartProgramming 6 жыл бұрын
nice one sir, keep it up 👍👍
@ujjwaljain9780
@ujjwaljain9780 4 жыл бұрын
why we are not checking for equals to if s1==s2
@santhoshlolam7143
@santhoshlolam7143 3 жыл бұрын
Sir Your explanation is awesome.please do more videos on interview based questions.
@hafizsakib2734
@hafizsakib2734 2 жыл бұрын
What will be the result when array 1 and array 2 any element become same?
@34adnanali26
@34adnanali26 3 жыл бұрын
nicely done sir
@vaneelakhatri
@vaneelakhatri 2 жыл бұрын
nice explanation sir
@dondlabhanuprakash1458
@dondlabhanuprakash1458 6 жыл бұрын
Excellent video sir
@duaa9649
@duaa9649 2 жыл бұрын
Thank you for this, was too helpful!
@manaldiab8540
@manaldiab8540 5 жыл бұрын
I owe you, you saved my life
@nagarajumuddey465
@nagarajumuddey465 6 жыл бұрын
Super.....sir add more videos this type
@bhargav8263
@bhargav8263 3 жыл бұрын
nice explanation.
@sumanthreddy5599
@sumanthreddy5599 6 жыл бұрын
does it handle duplicates in two input??
@vinothvk2711
@vinothvk2711 5 жыл бұрын
It wont remove duplicates.
@vinothvk2711
@vinothvk2711 5 жыл бұрын
kzbin.info/www/bejne/nZeap5d_ntNjms0 see this vdeo to remove duplicates... apply this after the merge sort🤗
@vikasgalande6564
@vikasgalande6564 Жыл бұрын
awesome! nice explained
@aakashb7100
@aakashb7100 6 жыл бұрын
Excellent explanation, please also explain how to merge n sorted array into an array
@Farahat1234
@Farahat1234 6 жыл бұрын
Very very osam explanation. God bless you
@lvrsvid
@lvrsvid 2 жыл бұрын
Am I correct to assume that you need another if, else in the even that two of the indices in arr1 and arr2 carry the same integer. If so can anyone elaborate where and how that should be implemented? Do you just change the third line to: if(arr[i]
@kashifkamran6274
@kashifkamran6274 5 жыл бұрын
sir what will happen if two elements are equal in arrays
@daanishfiaz7579
@daanishfiaz7579 4 жыл бұрын
the else statement covers the condition in which the two elements are equal to one another. for example, 0,1,2,3 and 0,4,5,6. it will hit the else statement, see that 0 is not less than 0 (first if statement), then hit the else statement adding the element in array 2 to the resultant array. Sorry if this is a bad explanation.
@168Abhinav
@168Abhinav 4 жыл бұрын
If there r duplicates then only one element will be copied Its wrong algorithm
@computerscientist9515
@computerscientist9515 5 жыл бұрын
sir thanks alot from qasim lahore pakistan
@HieuTran-mz6fp
@HieuTran-mz6fp 3 жыл бұрын
Thank for ur explanation
@aqibbutt6106
@aqibbutt6106 4 жыл бұрын
if one array is sorted in ascending order and other is sorted in descending order how we can merge them
@praveenchouhan6388
@praveenchouhan6388 4 жыл бұрын
superior explaination!!!!!!!!! great work dude :-)
@sudheermadasu9565
@sudheermadasu9565 4 жыл бұрын
Sir can u please do a video on algorithm for merging 2 arrays into a third array in descending order.
@hamzailyas1206
@hamzailyas1206 3 жыл бұрын
May you send a full code.
@nyogesh1837
@nyogesh1837 5 жыл бұрын
Please write the piece of code for printing that merged array.
@SonalikaTripathy-q6i
@SonalikaTripathy-q6i Жыл бұрын
How Merge sort sorts the following sequence of keys in ascending order 12,22,33,44 48,56,57,65,76,84 with neat diagram representing sequence of recursion calls. Explain its time complexity
@rodriguenasr7552
@rodriguenasr7552 4 жыл бұрын
well explained it was very helpful thank you
@mcodek5268
@mcodek5268 4 жыл бұрын
how can we merge these two arrays using the for loop?
@sweetysweety1535
@sweetysweety1535 5 жыл бұрын
Good expalnation sir. Ii is Easily understood ..👍
@SAURABHSINGH-od7tp
@SAURABHSINGH-od7tp 6 жыл бұрын
Excelent explanation👍👍👍
@anushkasathe5994
@anushkasathe5994 5 жыл бұрын
Great Explanation sir!!
@sivapotluri4217
@sivapotluri4217 5 жыл бұрын
sir....you are the best
@sujitamin949
@sujitamin949 6 жыл бұрын
excellent explaination
@heenavasdani3271
@heenavasdani3271 5 жыл бұрын
Nice explaintion sir..thanku so much.
@jonaidshahid9976
@jonaidshahid9976 5 жыл бұрын
Please tell the algorithm of printing the series of prime numbers from 2 to the number asked by the user
@alexgaurdian
@alexgaurdian 6 жыл бұрын
you explains very well 😍😍
@mahahrishi
@mahahrishi 5 жыл бұрын
How to merge multiple sorted array into one sorted array, could you please give an example
@randhawaMS
@randhawaMS Жыл бұрын
Thanks a lot sir 😊✨🙏
@pratapkumarreddymallidi4509
@pratapkumarreddymallidi4509 4 жыл бұрын
Hi Mr. Vivekanand , I'm facing problem in Java program where I have to merge the arrays and sort it in descending order . Please help
@FredoCorleone
@FredoCorleone 5 жыл бұрын
This indian man is the best!
@alokrai6658
@alokrai6658 6 жыл бұрын
Hi, sir what if the second array of last four elements are not sorted then, the resultant array will not be sorted.?
@raktimbanerjee5948
@raktimbanerjee5948 3 жыл бұрын
You have to intialised both the arrays as sorted
@mohammad-karbalaee
@mohammad-karbalaee 3 жыл бұрын
your knowledge is appreciated but if your accent was more understandable it would be perfect. anyway, thanks for this tutorial vid
@adarshshukla2055
@adarshshukla2055 5 жыл бұрын
you are amazing sir
@userprod2825
@userprod2825 5 жыл бұрын
Its clear now, thanks sir 👍🏼
@denerisbata8094
@denerisbata8094 5 жыл бұрын
You help me a lotttt!!! thank you very much
@vinodkaura
@vinodkaura 3 жыл бұрын
very well explained.
@ithacks9494
@ithacks9494 4 ай бұрын
why cant we use || then &&?
@sarbajitg
@sarbajitg 4 жыл бұрын
How to do inspace?
@shaikakhila9738
@shaikakhila9738 6 жыл бұрын
How can we decide whether the remaining elements in the left over are sorted?? How can we just copy paste
@shankarkarthikeyanmenon1165
@shankarkarthikeyanmenon1165 5 жыл бұрын
Shaik, we are not sorting here.. if both the arrays are sorted, then only this solution will work. for unsorted arrays we can not use this technique
@sunilmaddheshiya5217
@sunilmaddheshiya5217 6 жыл бұрын
simple and nice explaination
@vasantimalipatil2097
@vasantimalipatil2097 6 жыл бұрын
Hello sir what we have to do when array1 and array2 are not sorted
@gokulnath589
@gokulnath589 2 жыл бұрын
Excellent
@prabalranjangoswami1750
@prabalranjangoswami1750 6 жыл бұрын
this is really good...thank you sir
@glebignites5278
@glebignites5278 3 жыл бұрын
Thank you sir!
@u2lover10
@u2lover10 5 жыл бұрын
excellent explanation! thanks!! I've subscribed :)
@PankajSharma-tj1sn
@PankajSharma-tj1sn 4 жыл бұрын
What will happen if same element occurs
@dantewhite1818
@dantewhite1818 5 жыл бұрын
i followed this example in java in it only sorted the elements up until 9 this was a good start but it doesn't work
@orhunk90
@orhunk90 6 жыл бұрын
Great explanation!
Remove Duplicates from sorted Array
21:22
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 173 М.
2.7.2.  Merge Sort Algorithm
24:07
Abdul Bari
Рет қаралды 1,7 МЛН
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 11 МЛН
У вас там какие таланты ?😂
00:19
Карина Хафизова
Рет қаралды 23 МЛН
СОБАКА ВЕРНУЛА ТАБАЛАПКИ😱#shorts
00:25
INNA SERG
Рет қаралды 3,6 МЛН
Merge Two Sorted Arrays into a Third Sorted Array
9:43
Programming Tutorials
Рет қаралды 43 М.
Merge two sorted Linked Lists to form a new Sorted Linked List
13:59
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 172 М.
Merge Sorted Arrays Without Extra Space | 2 Optimal Solution
32:47
take U forward
Рет қаралды 211 М.
Introduction to Insertion Sort
13:20
Lalitha Natraj
Рет қаралды 162 М.
Merge Two Sorted Arrays | C Programming Example
8:12
Portfolio Courses
Рет қаралды 35 М.
Merge Sorted Array - Leetcode 88 - Python
10:18
NeetCode
Рет қаралды 229 М.
1- Merge Sort Algorithm
25:42
Codetpoint
Рет қаралды 19 М.
Learn Merge Sort in 13 minutes 🔪
13:45
Bro Code
Рет қаралды 333 М.
7.5 Selection Sort in Data Structure | Selection Sort Algorithm with C Program
17:49
Jenny's Lectures CS IT
Рет қаралды 1,4 МЛН
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 11 МЛН