top of page
Writer's pictureKrunal Chandan

Quick & Merge Sort - Together




Well to be fair enough, I almost searched on internet for quick sort and merge sort in same program, but all the programs, not literally, were too long and difficult to understand. But me and my friend, no name for confidentiality, were thinking too deep and after many minutes of thinking we finally made a program joining both of them together and were too happy to share it with all of you guys.


Starting we add 4 functions, namely, first 2 for Quick Sort and other 2 for Merge Sort. Well for Quick Sort one was to split the initial array into smaller arrays, then rearrange them according to there value, i.e., the bigger element than the pivot to the right and the smaller than pivot to the left. Well for all those, one is swapping, and second is of Quick Sort. For Merge Sort, to divide array into smaller arrays, were same like the Quick Sort but the next step is little intense, or difficult for some. To sort it by actually dividing the whole array into smaller elements, like literally 2 or 1 element at least. Then adding or merging (hence called merge sort), all the elements back together in the new temporary array.


All of these will just confuse you, well me and my friend first tried to understand it this way, but we first developed the program off-course with help of Internet but then understanding it to the root once we trial run it and then trying to dry run it (to check by writing). We were like a inch close to get destroyed if we didn't had solved the code, one day earlier, but thus we cleared it we are safe and sound for all of you to use our code, from internet, to just beat the world.


Here is the link to my GitHub account, where you can watch my code and get it understood or just copy paste where ever you want it. My friend does asked me to add his name, but I am ensuring that I will invite him to write a guest blog, well he is too good in Cricket, and he is gonna be expressing his views on the next Tour Of INDIAN Cricket Team. Well the earlier tour that was of Bangladesh, were a wrong decision, well it was just my opinion that you will be amazed with his experience, and the way he will express his thoughts on the next tour.


My Account : Krunal Chandan

My Repository : Quick-Merge Sort


Well for a new thing, I was thinking what should I get for next blog, Well what about Linked List, or Stacks might be, Well give your thoughts, in the comment, or just search me on Instagram, I am little active there, you might get a word or so from me there. 😁😁


Well till next blog....

Stay Yourself

Just stay..😑

15 views0 comments

Recent Posts

See All

Last Blogg For KNBLOGGS

My last blogg about gaming from your android, or my other blogs, that I published earlier were not a big hit, not like this website or...

Comments


About Us

LOGO_MAIN.jpg

Welcome to KN Blogg, the place where we're serious about tech, finance, movies, and games. Or at least, we try to be. We're a team of self-proclaimed experts, enthusiasts, and sometimes just plain clueless individuals, who love to share our thoughts, opinions, and occasional witty remarks with the world.

Posts Archive

Tags

bottom of page