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

Added quicksort C implementation #16

Merged
merged 6 commits into from
Mar 9, 2017
Merged

Added quicksort C implementation #16

merged 6 commits into from
Mar 9, 2017

Conversation

aviaryan
Copy link
Member

@aviaryan aviaryan commented Mar 8, 2017

Fixes #2

yashLadha
yashLadha previously approved these changes Mar 8, 2017
Copy link
Member

@yashLadha yashLadha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting can be done in the function part and label can be given to variables for their usages

@yashLadha yashLadha dismissed their stale review March 8, 2017 18:35

Need commenting

@yashLadha yashLadha requested review from yashLadha and removed request for yashLadha March 8, 2017 18:40
int main(){
int ar_size = 4, i;
int a[4];
a[0] = 2; a[1] = 3; a[2] = 0; a[3] = 4;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe simply

int a[4] = {2, 3, 0, 4};

@yashLadha
Copy link
Member

yashLadha commented Mar 8, 2017

@singhpratyush this code looks good. I am closing my review.

@singhpratyush
Copy link
Member

There are still some corrections to be done. @aviaryan : Please take a look at all the comments.

@aviaryan
Copy link
Member Author

aviaryan commented Mar 9, 2017

@singhpratyush Please review and squash merge this PR.

}
}

int main(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a space after ).

if ((prevind>-1) && (ar[i] < prevmax)){
temp = ar[i];
ar[i] = prevmax;
ar[ prevind ] = temp;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make spaces in index consistent.

#include "stdio.h"


void quicksort(int ar_size, int * ar) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra space.

@singhpratyush
Copy link
Member

Will merge locally because of conflicts

@aviaryan
Copy link
Member Author

aviaryan commented Mar 9, 2017

@singhpratyush There are no conflicts.

@singhpratyush
Copy link
Member

All set. Thanks.

@singhpratyush singhpratyush merged commit 02257d1 into master Mar 9, 2017
@singhpratyush singhpratyush deleted the add-quicksort-c branch March 9, 2017 09:42
rashinanwani pushed a commit to rashinanwani/algos that referenced this pull request Jun 24, 2017
# This is the 1st commit message:

# This is a combination of 5 commits.
# This is the 1st commit message:

changes

# This is the commit message iiitv#2:

changes

# This is the commit message iiitv#3:

changes

# This is the commit message iiitv#4:

changes

# This is the commit message iiitv#5:

changes

# This is the commit message iiitv#2:

Added Coin Change Problem [JavaScript] (iiitv#317)

* Added CoinChangeProblem [JavaScript]

* undo changes in other files

* Travis fix 1.0

* Travix fix v1.1

* Update comments

# This is the commit message iiitv#3:

fixed readme conflicts

# This is the commit message iiitv#4:

conflicts

# This is the commit message iiitv#5:

changes

# This is the commit message iiitv#6:

changes

# This is the commit message iiitv#7:

conflicts

# This is the commit message iiitv#8:

changes

# This is the commit message iiitv#9:

changes

# This is the commit message iiitv#10:

changes

# This is the commit message iiitv#11:

conflicts

# This is the commit message iiitv#12:

conflicts

# This is the commit message iiitv#13:

conflicts

# This is the commit message iiitv#14:

conflicts

# This is the commit message iiitv#15:

conflicts

# This is the commit message iiitv#16:

Added Longest Common Subsequence [Python] (iiitv#353)

* Added Longest Common Subsequence [Python]
Fixes iiitv#340

* changes

* travis issues

# This is the commit message iiitv#17:

Added Counting Sort [Go] (iiitv#361)

* Added Shell Sort [Javascript]

* Added Shell Sort [Javascript]

* Auto stash before rebase of "origin/master"
Fix spaces

* Added param comment

* Renamed

* Fixed temp declaration

* Added Counting Sort [Go]

* Time complexity corrected

* size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants