Skip to content

changes to comments of quick_sort.c #148

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions code/code/sorting/src/quick_sort/quick_sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ void swap(int *p, int *q)
}


//Last element is used a spivot
//Places elements smaller than pivot to its left side
//Last element is used as pivot
//Places elements smaller than or equal to pivot to its left side
//Places elements larger than pivot to its right side
int partition(int a[], int low, int high)
{
Expand Down Expand Up @@ -64,4 +64,4 @@ int main()
printf("Sorted array: ");
print(a, n);
return 0;
}
}