-
Notifications
You must be signed in to change notification settings - Fork 302
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: Add QuickSort C++ #255
Conversation
using std::cout; | ||
|
||
void quick_sort(int a[], int left, int right) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant blank line at the start of a code block should be deleted. [whitespace/blank_line] [2]
Origin: CPPLintBear, Section: all.cpplint
.
quicksort/Cpp/quick_sort.cpp
Outdated
i++; | ||
j--; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need a ; after a } [readability/braces] [4]
Origin: CPPLintBear, Section: all.cpplint
.
quicksort/Cpp/quick_sort.cpp
Outdated
quick_sort(a, left, j); | ||
if (i < right) | ||
quick_sort(a, i, right); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant blank line at the end of a code block should be deleted. [whitespace/blank_line] [3]
Origin: CPPLintBear, Section: all.cpplint
.
quicksort/Cpp/quick_sort.cpp
Outdated
|
||
} | ||
|
||
int main(void){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before { [whitespace/braces] [5]
Origin: CPPLintBear, Section: all.cpplint
.
quicksort/Cpp/quick_sort.cpp
Outdated
|
||
quick_sort(a, 0, a_size-1); | ||
|
||
for(int i=0; i<a_size; i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces around = [whitespace/operators] [4]
Origin: CPPLintBear, Section: all.cpplint
.
quicksort/Cpp/quick_sort.cpp
Outdated
|
||
quick_sort(a, 0, a_size-1); | ||
|
||
for(int i=0; i<a_size; i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces around < [whitespace/operators] [3]
Origin: CPPLintBear, Section: all.cpplint
.
quicksort/Cpp/quick_sort.cpp
Outdated
|
||
quick_sort(a, 0, a_size-1); | ||
|
||
for(int i=0; i<a_size; i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before ( in for( [whitespace/parens] [5]
Origin: CPPLintBear, Section: all.cpplint
.
quicksort/Cpp/quick_sort.cpp
Outdated
|
||
quick_sort(a, 0, a_size-1); | ||
|
||
for(int i=0; i<a_size; i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before { [whitespace/braces] [5]
Origin: CPPLintBear, Section: all.cpplint
.
quicksort/Cpp/quick_sort.cpp
Outdated
for(int i=0; i<a_size; i++){ | ||
cout << a[i] << " "; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]
Origin: CPPLintBear, Section: all.cpplint
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix all the commented issues and update the README table. All in one commit only.
Ref: https://github.com/NITSkmOS/Algorithms/blob/master/GIT_BASICS.md#follow-up
quicksort/Cpp/quick_sort.cpp
Outdated
@@ -0,0 +1,42 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant line
Corrected erros from 1st commit. Closes NITSkmOS#250
Changes made. |
@joao-p-marques checks are still failing |
Closes #250
For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!
Fixes #250
By submitting this pull request I confirm I've read and complied with the
below declarations.
{Tag}: Add {Algorithm/DS name} [{Language}]
, notUpdate README.md
orAdded new code
.After you submit your pull request, DO NOT click the 'Update Branch' button.