Let's march ahead, and create an unmatchable DSA course! ❤ Can someone please add timestamps, I will add them post-it.
@msdarshankirthic2 жыл бұрын
time stamps done bro
@harshavardhan1842 жыл бұрын
Bhai please upload videos asap..😭we from a normal tier 3 college are hoping for your videos...pls don't late
@harshavardhan1842 жыл бұрын
#striver pls make videos faster bhai 😭
@harshavardhan1842 жыл бұрын
#striver pls make videos faster bhai 😭..your content is too gud ...but our placements are going on fastly
@Shubham-bh1ph Жыл бұрын
Bhaiya please be fast in terms of uploading videos 😭😭😭
@Akash-xr6we Жыл бұрын
inspiration recording at 3 am when he can create content with so much dedication then why can't we learn dsa with same dedication hats off to you man.💯💯
@random-xl3zm Жыл бұрын
190 + likes to this comment but no sub comments Lemme fix it
@random-xl3zm Жыл бұрын
Hare krishna
@random-xl3zm Жыл бұрын
Hare krishna hare krishna krishna krishna hare hare Hare rama hare rama rama rama hare hare Chant this and be happy
@Akash-xr6we Жыл бұрын
@@random-xl3zm 😂😂 thanks dude
@random-xl3zm Жыл бұрын
@@Akash-xr6we no worries Jai siya ram😁
@expl0itr9 ай бұрын
In 4 years of college, when teachers came to copy and paste from their 10year old notes I couldn't gain any interest in DSA and felt stupid and never touched the topic post exam. And everything instantly clicked when I watched this video. Honestly your course is giving me insane confidence already. Hope I can make a change within a year, though it's difficult after doing full-time job but I get my confidence back when i see you making this huge stuff after working same or more hours. Planning to stay consistent! Thanks a lot! PS: We have the same chair 😁
@dhruvinkalathiya38099 ай бұрын
But why i can't hear his voice
@raodevendrasingh Жыл бұрын
just woke up and started doing dsa, and you are recording it at midnight, your efforts are not wasted at all Sir!! Thank you for providing such quality content for free.
@hiteshpanchal5772 Жыл бұрын
same brother.............i was watching the video suddenly at last striver said it's 3.30am and i just felt sham on my self boz he is teaching till night and i don't learn genuinely..
@raghavendaravijay26786 ай бұрын
Thanks!
@msdarshankirthic2 жыл бұрын
MERGE SORT - O(nlogn) - divide and conquer 1:16 - What is and Why Merge sort 3:00- Divide 5:54- Merge Pseudo code 17:15 - approach (divide) 20:34 - pseudo code (divide) 25:00 - dry run on divide (pseudo code breakdown) 32:42 - approach (merge) 33:46 - pseudo code (merge) 40:33 - C++ code 44:10 - Time complexity analysis 48:05 - Space complexity analysis ❤
@saivarun5529 Жыл бұрын
Superb explanation, sat for around 4hrs to understand how merge sort is working and then I found this video. Understood clearly within 50mins. Very nice and deep explanation.
@amitpatil62442 жыл бұрын
This is called content 🤓✨
@deveshmanitripathi9419 Жыл бұрын
Striver teaching how to code is just like a story. It really seems so easy to understand 😊
@Pooja-we3xs Жыл бұрын
Before I use to feel merge sort very difficult but after watching this video, I understood it very clearly. Thank you Striver.
@KeshavRaj-w4y9 ай бұрын
non other youtubers has such a type of dedication hats off
@prathamesh_utube Жыл бұрын
Thanks Striver, I 'understood' it perfectly! This channel has the potential to become huge with content like this.
@payaljain6825 Жыл бұрын
This level of clarity would have never been possible without ur video. Your energy of teaching any topic is what makes it more interesting. 🤟
@yhbarve2 жыл бұрын
This was the best explanation for Merge Sort on KZbin! Thanks
@Shagunverma-l8l11 ай бұрын
Fr
@changed217 Жыл бұрын
The efforts taken to make this video must have been insane, because this was frankly explained so well it's honestly brilliant. Thank you for all your efforts. Completing this at 4:47am here.
@iamnoob7593 Жыл бұрын
No compromise on sleep from my side , Body does not listen to emotions
@MANISHKUMAR-vn1yh2 жыл бұрын
best merge sort explanation on KZbin ever I'll never forget that thanks bhaiyya!
@darshanakv49469 ай бұрын
The title "STRIVER" for a reason!!✅
@AmanKumar-fe2ez2 жыл бұрын
Best merge sort ever but i little bit mad so have to watch it 2-3 times to get properly in my head btw thankyou Striver
@subhamsharma9097 Жыл бұрын
You are the real hero .. providing such a beautiful content in free of cost. thanks a lot bro.
@kaizjessani7303 Жыл бұрын
In my 4 years of engineering and 7 years of work experience, I finally understood merge sort with recursion. I can finally move ahead and sleep properly😂 Thank you so much. Really appreciated 🙏🙏🙏 Love you bro ❤
@Vishalkumar-fe9fu Жыл бұрын
🤣
@iamnoob7593 Жыл бұрын
now the question is whether u r going use it or not
@kaizjessani7303 Жыл бұрын
@@iamnoob7593 😂😂
@vivekgautam97665 ай бұрын
@@iamnoob7593 🤣🤣🤣🤣🤣🤣
@varuntanwar6746 Жыл бұрын
I hope you realize how much value you are creating. It's much more than you think. Thanks a lot!!
@shubhamagarwal14346 ай бұрын
#Free Education For All......... # Bhishma Pitamah of DSA...You could have earned in lacs by putting it as paid couses on udamey or any other elaerning portals, but you decided to make it free...it requires a greate sacrifice and a feeling of giving back to community, there might be very few peope in world who does this...."विद्या का दान ही सर्वोत्तम दान होता है" Hats Off to you man, Salute from 10+ yrs exp guy from BLR, India....
@devanshusangra6294 Жыл бұрын
44:2 - "I write codes in one go", the confidence i want
@pcyvlogs8130 Жыл бұрын
From all the KZbin tutorials, I definitely think that your videos are the best in terms of explanation and easy understanding. Thanks a lot, and please keep it up, I love the content!!!!!
@the.ankit.074 ай бұрын
I wrote the code at first attempt after your explanation ..........thank you so much..
@nandanitiwari8098 Жыл бұрын
These is the best explanation I have find in my entire dsa life. The best part that I always found in other dsa lectures is the best dry run and how to convert that explanation in code. ALOT OF THANKS. And that Time and Space Complexity part is like "Add a feather in a cap"
@navneetuppal9753 Жыл бұрын
As expected, Striver's Top notch explanation made Merge sort crystal clear. UNDERSTOOD!! thankyou striver for all the content
@ritikumaroy Жыл бұрын
A little correction at 24:37 You can't write if(low>=high). It will cross the time limit in some cases. As I'm facing this issue in GFG merge sort problem. Instead use if(low==high)
@venkatgaddam6587 Жыл бұрын
Ohhh!!! nice
@shriyamverma78338 ай бұрын
Thanks for pointing this out, I was getting TLE due to this on Leetcode.
@GOVIND_DWIVEDI8 ай бұрын
but why it is giving TLE ?
@dhritidiptaroy45343 ай бұрын
I hope you got the answer by now. If not, do tell will explain to you.
@AlokKumar-ot9sx3 ай бұрын
@@dhritidiptaroy4534 why?
@cinime Жыл бұрын
Understood! Super amazing explanation as always!! Thank you for your great effort even in the midnight !!!
@mayankyadav1290 Жыл бұрын
I'm pausing the video in between just to appreciate you, the way you explain things is just awesome man. Keep the good work coming. God bless you.
@meeradhumne46856 ай бұрын
Amazing job explaining step by step in very detail i read lots of article and watched other KZbin, but your explanation is owesome!!!, Thank you so much, before merge sort algorithm was very intimidating, but you made it sounds so easy. Thanks a lot again! I am glad I found your channel.
@swarnabhkashyap5764 Жыл бұрын
Great lecture. Slightly different implementation of mergeSort in python. def merge(a1,a2): res = [] l,r = 0,0 while(l
@ksankethkumar7223 Жыл бұрын
int mid =(low + high) / 2; might give an integer over flow resulting in a negative index which would throw Array out of Bounds Exception and hence its a good practice to use int mid = low + ((high - low) / 2); or faster way is int mid = (low + high) >>> 1 (For Java) and int mid = ((unsigned int)low + (unsigned int)high)) >> 1 (For CPP) to avoid any kind of overflows..
@utkarshsingh5652 Жыл бұрын
why in the last we did arr[i] = temp[i-low] and not arr[i]=temp[i ]
@ksankethkumar7223 Жыл бұрын
@@utkarshsingh5652 Because every time the low is not zero. In deeper recursive calls, low can be anything
@shivangitekriwal30568 ай бұрын
@@ksankethkumar7223but we added elements in temp so index might be from 0 to high??
@NihalNamdeo5 ай бұрын
@@utkarshsingh5652 bro did u understand i-low concept?
@NihalNamdeo5 ай бұрын
can you explain i-low logic please, I can't get that? low would always be 0, I don't understand the point, although not doing this, does give an error
@RaginiGupta-q1v3 ай бұрын
Your explanations are always the clearest-straight to the point and easy to understand. Whenever I find one of your videos on a topic, I know I don’t need to look elsewhere.
@TrendyGamer007 Жыл бұрын
just mind blowing explanation .
@AryanPatel-wb5tp4 ай бұрын
great explanation not one other video on KZbin is as in-depth for the actual understanding of how it works
@Raj10185 Жыл бұрын
The Best video avliable for Merge sort on internet . Tysm Striver Understood everything
@shifteditz064 ай бұрын
Not a single channel explained this important part(i.e. dry run) : 25:01 to 32:38, thank's man ❤
@amishaagarwal4847 Жыл бұрын
why did we use temp [ i-low ] while storing the temp values in original array
@RaghavSharma19201 Жыл бұрын
same question please answer
@_HarshKumar-hx8cs Жыл бұрын
To make it start from 0 index ,bcz temp is storing from 0 index
@DeepakGupta-rp8ld Жыл бұрын
Bro only ' i ' is also running...
@MAX_RITIK4 ай бұрын
just use arr[i]=temp[i]
@prathamgupta916616 күн бұрын
Striver you are the best teacher for DSA algo out there ....stunned by the teaching style of yours and so much in dept explaination that is hard to find nowadays..thank you
@saurabhkumarsingh95502 жыл бұрын
Bhaiya please make videos on oops concepts.... The only thing missing from your placement series 🥲
@learncreative47322 жыл бұрын
Yes sir please
@nischayagrawalVlogs Жыл бұрын
Kya explain kiya hai bro !! like wtf pure yt pe itna acha explanation nai mila meko. Hats off to you my man.
@yashhokte1020 Жыл бұрын
Implementation code of Merge Sort algorithm in Java : class Solution { public static void merge(int[]nums,int low,int mid,int high){ int left=low,right=mid+1; Listli = new ArrayList(); while(left
@charuprabha96969 ай бұрын
nums[i] = li.get(i-low); why are we doing this? nums[i] = li.get(i) will this not wokr?
@Anurag-lz8nzАй бұрын
Thanks
@485_rahulkumar7 Жыл бұрын
#striver best merge sort video i ever watched. It clears my all doubt points
@ashishsahay1901 Жыл бұрын
@Raj you are changing the field of programming even the concepts and the visualization which are difficult for the experienced professional by watching your videos feel like it's just a cakewalk. Thanks for the content, keep doing it. JAVA CODE for the merge Sort Algorithm----- TC--O(n*logn) & SC--O(n) import java.util.*; public class Solution { public static void mergeSort(int[] arr, int n) { // Write your code here. ms(arr,0,n-1); } public static void ms(int arr[],int low,int high) { if(low>=high) { return; } int mid = (low+high)/2; ms(arr, low, mid); ms(arr, mid+1, high); merge(arr,low,mid,high); } public static void merge(int arr[],int low,int mid,int high) { int left = low; int right = mid+1; java.util.List temp = new ArrayList(); while(left
@noob_coder89263 ай бұрын
LORD STRIVER🙏
@Himanshu_cric183 ай бұрын
best video ever i have seen of merge sort that able to explain the concept briefly
@Flash-qr5oh Жыл бұрын
@39:52 why can we write temp[i] directly instead of i-low when it only depends on the value of i
@rohandhalpe9084 Жыл бұрын
same problem bro ,i cant understand it from past 3 days
@rahulbisht7098 Жыл бұрын
Same question 💀💀
@amansinghal4663 Жыл бұрын
Because this loop will be recursively called for several times and for each time, the value of low will change. If this loop would have ran only 1 time (i.e. if this loop was inside a non-recursive function), then your logic would have worked. But i am also unable to get how he came up with this logic of (i-low). He forgot to tell the intuition behind it.
@NihalNamdeo5 ай бұрын
@@rohandhalpe9084bro did you understand it now, please help...
@playwithkoki23 күн бұрын
So much of effort put in explaining this algorithm and explained so well. Real gem of DSA. Thanks ❤
@dangerboy_yt774811 ай бұрын
Striver audio got muted please check it
@hitensamalia Жыл бұрын
kuch kuch aata tha lekin video dekh ke accha se ho gya sab clear... Thanks, bhaiya!!!😊
@Vladimir.39665 Жыл бұрын
for(int i = low; i < high; i++) { arr[i] = temp.get(i - low); } while copying the temp array to original array why we are subtracting low from i, can't we directly write i ?
@AmitSharma-nv2oj5 ай бұрын
did you got the answer?
@siddhantsingh33464 ай бұрын
The subtraction of low from i is necessary because temp is a smaller array that starts at index 0, whereas arr is the original array that might start at a higher index low. Here’s the breakdown: i is an index in the original array arr, which ranges from low to high - 1. temp.get(i - low) is accessing the corresponding index in the temp array, which starts from 0. If you directly use i without subtracting low, you would try to access elements from temp at an incorrect index, leading to an out-of-bounds error or incorrect copying. this is the answer given by gpt
@cricket-connection3 ай бұрын
no way , DRY on Divide Part got me like nothing else can .... , excatly what I was looking for... thank you man...
@abhinaash460210 ай бұрын
why use temp[i=low] and not temp[i] .
@prernasharma97225 ай бұрын
For example if the divided array is 1,3 with index 3 and 4... after further division we get two array 1 and 3 . Now we have to sort and then merge and then store in temporary array, whose indexing starts from 0 BUT the original arrays index starts from 3 then 4... that is why we do temp[i-low] to make the index 0 for accessing the 0th element of temp...... Hope you understand.
@1nonly_user3 ай бұрын
Thanks @@prernasharma9722
@ІринкаСабат9 ай бұрын
i have already watched 20 videos about this sorting, and your are the best!!!!!!!!!! thanks!!!)))
@harshavardhan184 Жыл бұрын
Please make the videos faster...sir please please please....very less time is there for our placements.....my humble request sir😭😭😭😭😭🙏🙏🙏🙏🙏🙏🙏🙏🙏
@Vinayreddy_555 ай бұрын
You don't understand if he makes videos faster. Just watch the video in 2x speed
@BhavanaReddy156 ай бұрын
Wow didn't know this was a 50 minute video!! Never made me look at the time ❤❤❤ this is the best video on merge sort❤ thank you very much 😄
@viskumdee Жыл бұрын
at 43:49 line number 28 why arr[i]=temp[i-low] ; why (i-low)? why cant we write simply i itself ??
@AmitSharma-nv2oj5 ай бұрын
same doubt
@madhavbiradar20292 ай бұрын
This was an amazing explanation for Merge Sort I had ever seen....Thanks for upskilling us
@harshavardhan184 Жыл бұрын
Will you keep next video or not??.. 14days it's been
@ayushiydvKG6 ай бұрын
11:44 I've studied this algorithm several times, but the clarity I gained from Striver Bhaiya is unmatched. Thank you sincerely, Bhaiya. ❤
@harshavardhan184 Жыл бұрын
Omg 16days per 1video..omg 😱😳 bro..pls think of us..we here are waiting for your videos faster and eager #striver..i think you are consistent 😓😓😓
@NIRAJ-bu2hpАй бұрын
one of the best video i have ever seen on sorting
@me.rishiii Жыл бұрын
Why are we doing 𝗮𝗿𝗿[ 𝗶 ] = 𝘁𝗲𝗺𝗽[ 𝗶 - 𝗹𝗼𝘄 ] Instead of 𝗮𝗿𝗿[ 𝗶 ] = 𝘁𝗲𝗺𝗽[ 𝗶 ]
@friedfire9462 Жыл бұрын
if u found explanation please explain
@Bharat_Rider Жыл бұрын
See 5 4 3 2 1 Here it will broken as 5 4 3 and 2 1 Then 5 4 3 will be broken as 5 4 and 3 Here low will be 0 so there will be no problem we will copy temp element into the vector but for 2 1 the low I'll be 3 and there in temp vector will have elements in 0 and 1 so to copy them we subtract it will low so that we can access the temp elements at starting indexes
@architgupta8840 Жыл бұрын
because the starting value of i is "low" and we need to start from zero in temp i.e, temp[0]
@dumbstonks5 ай бұрын
Probably the best video available on Merge Sort Ever. Goated.
@dishas63285 ай бұрын
Thank you so much for the amazing explanation🙏.I understood the algorithm perfectly only because of this video.
@simran5048 Жыл бұрын
Thankyou for explaining this very tough algo in a very simple way , now it's just get locked in my mind , all credit goes to you !! Thanks a lot !
@mdfaizanmdfaizan60417 ай бұрын
Great explanation sir, i didn't understand this concept from love babbar sir so i came here and got it ❤❤❤
@sahitid55706 ай бұрын
Shocked to see that the time of completing the recording is 3:20 AM.. It shows your unwavering dedication.. hatsoff to you striver!! you are an inspiration. Understood the concept very well!!
@codinglover5251 Жыл бұрын
your explanation method is awesome as compare to other . I saw many video in merge sort but I understand only in this video. thank you sir❤❤🔥🔥👍
@janatalari61396 ай бұрын
Before starting this dsa course ,i felt merge sort is very difficult but striver explained it very clearly ..Thank you Striver 😍
@Vikhyath_Shetty8 ай бұрын
The best explanation on merge sort! I had a confusion while backtracking, which has been sorted out now.
@ArunKumar-vd8zt9 ай бұрын
One of the best explanations I have ever seen on KZbin 🛐
@tahuraalam77 ай бұрын
I haven’t seen anyone making such in depth videos 😮. You are doing a great job striver ❤
@adveshdarvekar773325 күн бұрын
Absolute respect to you man for teaching so well
@acroshubham9 ай бұрын
Raj bhaiya, you are literally phenomenal. In this era of recession, you're the sun of hope. So no more excuses just strive every single day to become better.
@viploveparsai98815 ай бұрын
Hats off to you man, great explanation. I didnt get this type of explanation for this algorithm all over th youtube, specially the dry run.
@SR09947 Жыл бұрын
Waah bhai thank you i watched a lot of videos of mergesort but no one had explained like u bro❤
@sabahkt4010Ай бұрын
one of the best dsa lectures I had in a long time.
@ahnafadib87747 ай бұрын
how is bro so good at explaining, smb give this man an award
@totalgamingsecond55862 ай бұрын
Striver because of you I can bost in my career ❤️ thanks you so much for bringing this type of lovely content of dsa
@udbhavbhartiya92235 күн бұрын
best explanation for merge sort on whole youtube🤩
@RajeshKumar-x7l5y5 ай бұрын
Really appreciate your work ❤❤❤ Actually i confused in this topic from last week and now i got it after watching this super lecture on merge sort Dry run is part best for understanding the concept of merge sort and thank you so much ❤️
@rajpalsinghchauhan82137 ай бұрын
Best Explaination of Merge Sort, Really thank you Striver.
@_Kunal_Pawar10 ай бұрын
Once again, an outstanding video! Thank you for investing so much effort in breaking down the approach, providing clear pseudocode, illustrating with recursion trees, and finally, implementing the solution. Take good care of your health too! I hope that you are at least getting sleep for 7 to 8 hours.
@Entertainment-fl6ep6 ай бұрын
I am just looking for this type of explanation but no one describes like you. At last you described it in part by part thanks a lot brother. I am a big fa of yours ❤❤
@FireGamerz-of6vv11 ай бұрын
After Watching Recursion Videos. In sorting once concept is know, i am able to write the structure with code on my own. MAy Be paper work is playing the major role. Every video is full of content with zero to hero. Its really great🚀🚀🚀🚀🚀
@harshitrautela6585 Жыл бұрын
🎯 Key Takeaways for quick navigation: 00:43 📚 *The video covers the algorithm "Merge Sort" as part of the Strivers A2Z DSA Course.* 01:53 ⏰ *Merge Sort offers better time complexity compared to bubble sort, insertion sort, and selection sort, making it a more optimized sorting algorithm.* 02:49 🔄 *The lecture flow involves explaining the Merge Sort algorithm, presenting pseudocode, conducting a dry run of recursion, and finally, coding the algorithm in a programming language.* 05:47 📉 *Merge Sort divides arrays hypothetically, then recursively sorts and merges the divided parts until a single element is reached, ensuring a sorted final array.* 08:44 🔄 *The algorithm uses a divide-and-conquer approach, repeatedly splitting arrays and merging them back in a sorted manner until the entire array is sorted.* 10:18 🧾 *The merging step involves comparing and arranging elements from the divided arrays to create a sorted array.* 14:06 🔄 *The merging process uses two pointers to compare and merge elements from the sorted left and right arrays back into a single sorted array.* 17:42 🔍 *The pseudocode introduces the concept of "low" and "high" indices to represent the starting and ending points of hypothetical arrays during recursion.* 20:54 ♻️ *Recursion is applied in the pseudocode, where the array is divided into two parts, and the algorithm is recursively called for both the left and right halves.* 23:13 🛑 *The base case for stopping recursion is not explicitly mentioned in the provided transcript chunk.* 23:27 🤖 *The base case in Merge Sort occurs when the array has only one element. The algorithm stops dividing and returns when low equals high.* 25:16 🛠️ *The Merge Sort algorithm recursively divides the array into halves until it reaches single-element arrays. Then, it merges the sorted halves back together.* 32:53 🧑💻 *To understand the merge pseudocode, envision merging two sorted arrays. The merge function compares elements from the left and right arrays, adding the smaller one to the result.* 43:41 🔄 *The time complexity of Merge Sort is O(n log n) due to the logarithmic nature of recursive divisions and the linear time taken for merging in the worst case.* 47:19 📊 *The time complexity of Merge Sort is approximately n log base 2 n, considering the logarithmic nature of recursive divisions and the linear time taken for merging.* 48:14 🧠 *Merge Sort has a space complexity of about big O of n, mainly due to the creation of a temporary array during the merging step. No significant additional space is used in other parts of the algorithm.* Made with HARPA AI
@mukundmohan43015 ай бұрын
TBH This is my first comment on any study youtube channel ..and i genuinely appreciate this man's effort from bottom of my heart ..whatttaaa explanation ..straight into the head..thankss striver bhaiya 💌💌
@Sarjais_Raja7 ай бұрын
The amount of energy and effort you put in this is amazing
@shwetachoudhary90036 ай бұрын
u just taugh this algorithm in the most convenient pattern.. i m just too impressed from ur teaching skill sir... thank you soo much❤ Gol bless u
@nagarajmnaiknagaraj18138 ай бұрын
How i express your teaching skills You r amazing!!! I seen so many videos on merge sort but no one explain like you even my college professor I thank to myself for finding this amazing playlist.
@abhiramkurapati54454 ай бұрын
Hats off to u bro ❤ as you are recording the video at 3:28 am and not charging a single rupee . We love your dedication
@kshitijsrivastava7849 Жыл бұрын
watching ur for first time and my mind blown by ur explanation ....really great work..hats off to u
@premsoni619 Жыл бұрын
Wow, this DSA course is absolutely fantastic! 🚀 The explanations are clear and easy to follow, and the examples provided really helped solidify my understanding. I've been searching for a comprehensive resource like this, and I'm so glad I stumbled upon it. A huge shoutout to the creator for putting together such a valuable learning resource. Kudos! 👏💯 #DSA #TUF
@pranavpurankarАй бұрын
Dude excellent, strong base in fundamentals like log and algo is must. You nailed it, man! Thanks for everything, salute to your efforts💚
@me_suryans2 ай бұрын
These lectures exactly fit my need. Thanks for everything.
@nikhiljain57334 ай бұрын
good quality and very important for placement course you have made.
@thefourhourtalk8 ай бұрын
it took me near about 4 hours to completely understand the sorting technique I am in first year of engineering an average guy hoping that ..... this stuff takes time for beginners