Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick_sort.cpp #84

Merged
merged 1 commit into from
Oct 9, 2020
Merged

Conversation

Aj12345616
Copy link
Contributor

In Insertion Sort, you simply went through each element in order and inserted it into a sorted sub-array. In this programm, you cannot focus on one element at a time, but instead must deal with whole sub-arrays, with a strategy known as "divide and conquer".When partition is called on an array, two parts of the array get 'sorted' with respect to each other. If partition is then called on each sub-array, the array will now be split into four parts. This process can be repeated until the sub-arrays are small.
In this programm, I print array every time partitioning method finishes, i.e. whenever two subarrays, along with the pivot, are merged together

In Insertion Sort, you simply went through each element in order and inserted it into a sorted sub-array. In this programm, you cannot focus on one element at a time, but instead must deal with whole sub-arrays, with a strategy known as "divide and conquer".When partition is called on an array, two parts of the array get 'sorted' with respect to each other. If partition is then called on each sub-array, the array will now be split into four parts. This process can be repeated until the sub-arrays are small. 
In this programm, I print array every time partitioning method finishes, i.e. whenever two subarrays, along with the pivot, are merged together
@DakshKK DakshKK merged commit f7fe1cb into developer-student-club-thapar:master Oct 9, 2020
@DakshKK DakshKK added the good first issue Good for newcomers label Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants