Do you want to learn python from me with a lot of interactive quizzes, and exercises? Here is my project-based python learning course: codebasics.io/courses/python-for-beginner-and-intermediate-learners
@lokeshr8082 жыл бұрын
Perfect way of teaching tech. I learnt a way better, fast and effective. Thank you sir.
@vircycure4 жыл бұрын
I was watching merge sort code from different different blogs and different different youtubers but I haven't get anything. Today accidentally I watch this video. I understood everything. The way you teach is really awesome sir. Thank you from full of my heart 🖤
@shubhamh74514 жыл бұрын
damn bruh same.
@quyenscc3 жыл бұрын
Same things happened to me. Lucky that I found this ^^
@agasti20077 ай бұрын
Learning DSA is one thing, but what I admire most about you is your line of thinking - how you start simple and slowly build on to it. I personally start with every problem, thinking in all directions at the start, and run into analysis paralysis. The way you teach is much appreciated.
@mrigankchoudhary3 жыл бұрын
2 lectures left till i complete your full playlist, tysm i have been following your playlist since last month seeing it every day 1-2 hrs...it helped me learn dsa ...tysm...really it will always be a part of me in future..
@ceo_google3 жыл бұрын
thank you very much bhaiya !! Now after practicing this on my own ,I can say my merge sort is clear , and i can move to other topics
@codebasics3 жыл бұрын
Glad it was helpful!
@latencey3842 жыл бұрын
really good tutorial, definitely liked the different approach of starting with the merge function then moving in to the main recursive part.
@RachitKapoor214 Жыл бұрын
This lecture series is the best learning I have had in Data Structures, thank you so much for sharing the information in such a simplified form and thank you for motivating every single time to perform the activities. Completing the activities gave me a great confidence in coding in Python. Thank you so much Dhaval Sir, this was very very helpful!
@tusharnautiyal89982 жыл бұрын
Best video ever i tried many video for understanding merge sort but this is the only one i was able to understand properly.
@harshutanku96503 жыл бұрын
please make more on these algo's the most imp every cs student should know
@RadhamaniRamadoss2 жыл бұрын
I understood merge sort only after watching your video..Thankyou sir..
@devinmcmillen78272 жыл бұрын
This is a great video. It's a different perspective than what I've seen in other videos but it really works. I'd highly recommend this video for someone new or as a refresher. Fabulous
@KayYesYouTuber11 ай бұрын
This is simply beautiful. You are very good teacher. Very lucid explanation. Thanks.
@ArunKumar-yb2jn3 жыл бұрын
One of the good things is you share other resources (like Khan Academy). Other trainers like to keep good resources to themselves. Thank you!!
@iwuomasolomonuched5187 ай бұрын
You're one of the Best. You deserve a hat trick of subscription if that was possible.
@timo80323 жыл бұрын
THIS IS THE BEST EXPLANATION OF THIS ALGORITHM BY FAR!!!!!!!
@nehakumar98893 жыл бұрын
I skipped this algorithm a lot of times. Finally, I understood. From class 12 to MCA. That's how long it took me to understand this algorithm
@codebasics3 жыл бұрын
I am happy this was helpful to you.
@tesfatsionshiferaw34744 жыл бұрын
I love your videos man! I will be contributing to your channel once I start earning!
@codebasics4 жыл бұрын
Awesome! Thank you Tesfatsion!
@amranmohamed3772 жыл бұрын
@@codebasics Even me. Inshallah
@shubhamh74514 жыл бұрын
no one: codebasics: we are gon "short" the array. anyways, great video sir! understood!
@omo20423 жыл бұрын
I think a better approach would be to say: # If a reached the end of list a add the remainder of b to sorted_list, and vice n verca if i == len_a: sorted_list += b[j:] else: sorted_list += a[i:] This way you avoid running extra loops
@awsomeslayer13 жыл бұрын
True, I also did the same thing by using extend()
@nishchaysingh76013 жыл бұрын
else part will print the a list again instead put an if statement for both
@krishnachaitanya12653 жыл бұрын
It will do same on backend. But yeah makes easy to write
@AmanKhan-yf4wd2 жыл бұрын
what about ? def merge_two_array(l1,l2): return sorted(l1+l2)
@Jack_X0753 жыл бұрын
While doing the in memory merge sort, we cannot simply write, arr[k] = a[i] and similary arr[k] = b[j] we have to swap them as variables arr, a and b........all are pointing to the same list in memory. so if we do arr[k] = a[i], this will lead to a data loss as the original value at arr[k] will be overwritten. This became apparent when trying to attempt the exercise. I believe over looking this was intentional on part of the teacher.
@zack176 Жыл бұрын
How do we swap them
@entity56788 ай бұрын
very well explained sir with bottom-up approach..
@khanplayoffs2 жыл бұрын
I recommend that you start from search and sort algorithms first and then learn the data structure, it will help you in recognizing the functions
@mohammadmohsinmohammedmohs97174 жыл бұрын
sir please continue uploading videos. why did you stop at 19th video
@tamilvanan3423 жыл бұрын
the best part is your exercises. Please keep up the great job and thanks
@codebasics3 жыл бұрын
👍🙏🎊☺️
@zahid19092 жыл бұрын
True, bruv! There’s no parallel of this step by step exercise with commentaries, and optimizing and refining process! Great job, boss!
@zack176 Жыл бұрын
I just hope you show leave comments in the exercise i can't seem to understand the code
@ZinduZatism3 жыл бұрын
thank you man you have explained very well in detail much appreciate it and subscribed
@codebasics3 жыл бұрын
I am happy this was helpful to you.
@Hariom_143-2 жыл бұрын
Your Teaching is too good sir.. Thankyou for the course
@iwuomasolomonuched5187 ай бұрын
You're a genius.
@paulascatarelli53482 жыл бұрын
What a great teacher!
@codebasics2 жыл бұрын
Glad you think so!
@SyaerulRochman Жыл бұрын
amazing teacher
@harsh20143 жыл бұрын
Helped me to understand, Thanks!
@codebasics3 жыл бұрын
Glad it helped!
@wouterrijsdijk6043 Жыл бұрын
Excellent explanation!
@ZhagaramTech3 жыл бұрын
Awesome explanation..... Love it
@samuelkantor82424 жыл бұрын
Well done, so clear and helpful
@codebasics4 жыл бұрын
Glad it was helpful!
@shweta73623 жыл бұрын
Thank you :D this seems a lot more easier now🙌✨
@codebasics3 жыл бұрын
Happy to help!
@shivam9aa94 жыл бұрын
Dhaval bhai @codebasics, bs aap videos banaye bolke I have revived my long crushed dream to prepare for google, cas i always was afraid of DS and Algo topics. Ab aap padha rahe ho to nhi hai darr. I am starting again and I will not let it go this time. Bhai next destination -> aapke channel pe interview "how i cracked a product company interview". Wish me luck, long road ahead.
@codebasics4 жыл бұрын
Kumar, you have my best wishes. And sure i will do an interview with you for that cracking interview for product based company. Wish you all the best my friend 😊👍
@BABA-oi2cl3 жыл бұрын
Thanks for this explanation, sorted all my problems ;)
@stevenzayas55272 жыл бұрын
I always laugh at the veiled threats for prematurely clicking on the Solution in the Exercise... XD
@Narriz3 жыл бұрын
Excellent.
@codebasics3 жыл бұрын
Glad it was helpful!
@kunalmahajan73343 жыл бұрын
Thanks ,clean explanation
@ritikajaiswal38242 жыл бұрын
Please make a video on different types of algorithm like DFS, BFS etc.
@kmnm94632 жыл бұрын
Hi Dhaval, Perfect example and clear code, once again from you. Have a query which I am trying to get clarified for sometime now. How do we use merge sort for array of odd number of elements.? I needed to have the code for the same. Please help! Krish
@Nick-uo2bi2 жыл бұрын
Instead of using while two times we can use sorted_list= sorted_list+a[i:]+b[j:]
@Zydres_Impaler Жыл бұрын
Thanks so much
@datascience30082 жыл бұрын
Thanks!
@mohammadgholampoor25392 жыл бұрын
Thank you ♥♥
@codebasics2 жыл бұрын
You're welcome 😊
@senthilkumarradhakrishnan744 Жыл бұрын
I just want to know one thing, you just eliminated a new array just to save memory and other optimisations, but even left and right variable that we use are storing as many lists right?
@ranganathnarasappa46804 жыл бұрын
Thanks for sharing this video...it is easy to understand....could you please make some videos on Recursive function?
@codebasics4 жыл бұрын
sure will try
@VarunKumar-pz5si4 жыл бұрын
When you will announce the giveaway winners?
@codebasics4 жыл бұрын
Already announces. You are one of the winners. 😊
@meralmaradia47742 жыл бұрын
Hello Sir, can you please create a video developing of project using only DSA ?
@raghavb12762 жыл бұрын
But why will the technique not work on unsorted arrays?
@debojitmandal86703 жыл бұрын
Sir it's easier to sort list or int it's difficult tonsolve strings and dictionary so I have no clue how to even approach the exercise problem you have given
@anirudhgoutam64013 жыл бұрын
merge_two_sorted_list function only performed on sorted list ??? I'm Right Na
@avishek844 жыл бұрын
Can you recommend some books with Data Structures with Python as well?
@anoopsinghbhakuni91324 жыл бұрын
bro same problem hai mere saath, upar se codebasics sir, kaafi slow videos daal rahe hai, pata nahi playlist puti kab hogi
@codebasics4 жыл бұрын
Bhai anoop, yaar me bahut hi busy hu.. weekend me mera movie watching ka time nikalake ye video bana raha hu. I understand you guys want to learn fast but trust me I am on it. there is few more videos left but I have covered most of the content. Did you finished all exercises from this playlist?
@kashmirilalchitkara68724 жыл бұрын
@@codebasics it's ok no slow at all. It is clear all doubt in this slow speed
@ALLINONETV14 жыл бұрын
@@codebasics waiting ...
@Ram-vg5fu3 жыл бұрын
@@codebasics still waiting sir :-)
@mohammadmohsinmohammedmohs97174 жыл бұрын
Sir should we learn C/C++ to understand DSA, i know C language(1st year enginnering) but i know python very well. Should i follow this series??
@VivekTiwari034 жыл бұрын
You can do very well in DSA with Python itself.
@mohammadmohsinmohammedmohs97174 жыл бұрын
@@VivekTiwari03 but people say you cannot implement many algorithms in python???
@VivekTiwari034 жыл бұрын
@@mohammadmohsinmohammedmohs9717 You can implement EVERY SINGLE algorithm that you can in C/C++ in Python as well. Python generally isn't suited only because its a slow language in itself, but other than that there are no cons of using Python.
@mohammadmohsinmohammedmohs97174 жыл бұрын
@@VivekTiwari03 but in campus placement will they all specifically for c /c++??
@VivekTiwari034 жыл бұрын
@@mohammadmohsinmohammedmohs9717 I know man. But more and more companies are accepting Python these days.
@MuhammadFaizan-mi9yo4 жыл бұрын
Hello sir how are you? I Gotta a big trouble please help me i have formated my laptop accidentally and lost all my 500 gb data plzzzzz plzzzz tell me how can i recover my data after making new partition again.plzz replay me ASAP
@vishaldubey34634 жыл бұрын
Sir aap KZbin channels ko leke ek series Banane wale the apane dusare channel pe??
@codebasics4 жыл бұрын
yes vishal... that will come up but not sure when. I am busy with deep learning and data structures series right now. once these are over I can work on other plans.
@Guderian4443 жыл бұрын
I didnt get why at the end you add k ?? It worked without it ....
@reubydoobydoo13833 жыл бұрын
to improve space complexity
@paulascatarelli53482 жыл бұрын
Instead of creating a new list (which takes memory), he creates another variable k to be able to concatenate the elements in the correct order; using the space of one of the already existing lists, is it clear?
@mohsinkhattak28402 жыл бұрын
hey just wondering when we are using the two while loops outside the main while loop. will it not simply append the remaining elements of either the list without comparing the remaining values?
@luvubangaram31392 жыл бұрын
no, not actually. because here i is incremented and after exiting the while loop that i value remains incremented. just print i value after while loop so that you can experience my logic.
@ShrinivasJamvant2 жыл бұрын
sir would you mind sharing the name of compiler you use for python programming.
@anotheryoutuberperson38Ай бұрын
He used PyCharm. He said this in the video.
@F999-t7o2 жыл бұрын
If __ name__ == '__main__': can anyone explain this line, why use this line? Thank u
@sagarhm22374 жыл бұрын
Sir how to edit vedios like u I love ur Contnt and editing
@codebasics4 жыл бұрын
I use camtasia studio for screen recording and editing
@sagarhm22374 жыл бұрын
Thanks sir
@vatsalsharma57914 жыл бұрын
Sir is this the last tutorial in this series?
@anoopsinghbhakuni91324 жыл бұрын
pata nahi bhai ye series kab puri hogi, samajh nahi aa raha
@codebasics4 жыл бұрын
nope. there are few more left but i have covered majority of the content so you can say it is coming to an end.
@anoopsinghbhakuni91324 жыл бұрын
@@codebasics sir i have seen may videos on DS&A on youtube , but aapki sabse best hai, concepts kaafi acche se cover ho rahe hai. thank you so much.
@poojithakumaran47154 жыл бұрын
@@codebasics but will you put algorithm as well apart from DS
@StyleReDesign Жыл бұрын
woahhhhhhhhhhhhhhhhhhhh
@amandwivedi23022 жыл бұрын
alag se while loop ki zaroorat hi nahi thi pahele me hi or karna tha and nahi
@Aryansingh-fk7hy3 жыл бұрын
merge_sort method is not sorting in my case!!
@prasadshete7812 жыл бұрын
4:53 😅😂😂
@Khanarmaanrokz4 жыл бұрын
didn't understood.
@kashmirilalchitkara68724 жыл бұрын
Sir c++. python which is better in future in data structure data