Рет қаралды 449
In this video, I've demonstrated the algorithm to merge or combine two sorted arrays into a 3rd sorted array. Merging two sorted arrays is an integral part of the merge sort algorithm. This question is also a popular question in coding interviews. The concept of this algorithm can be extended to solve merge K sorted arrays/lists.
I used playing cards to visually explain the algorithm. Hope it helps to understand this algorithmic problem.
algorithm and data structures interview questions
00:00 Intro
01:51 Demonstration of how the algorithm works with playing cards
06:45 Time complexity