-
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
selection_sort.c: Add Selection Sort in C #163
Conversation
selection_sort/C/selection_sort.c
Outdated
void print_array(int[], int); | ||
|
||
int main() { | ||
int arr[] = {4,3,42,82,5,2,33}; |
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 after , [whitespace/comma] [3]
Origin: CPPLintBear, Section: all.cpp
.
selection_sort/C/selection_sort.c
Outdated
} | ||
|
||
/* Selection Sort algorithm */ | ||
void selection_sort(int arr[], int n){ |
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.cpp
.
2bf8538
to
57c12d2
Compare
selection_sort/C/selection_sort.c
Outdated
void print_array(int[], int); | ||
|
||
int main() { | ||
int arr[] = {4,3,42,82,5,2,33}; |
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 after , [whitespace/comma] [3]
Origin: CPPLintBear, Section: all.cpp
.
selection_sort/C/selection_sort.c
Outdated
} | ||
|
||
/* Selection Sort algorithm */ | ||
void selection_sort(int arr[], int n){ |
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.cpp
.
2a5e03a
to
fbf85e8
Compare
fbf85e8
to
011c195
Compare
Comment on 011c195, file queue/cpp/Queue.h, line 0. No #ifndef header guard found, suggested CPP variable is: QUEUE_CPP_QUEUE_H_ [build/header_guard] [5] Origin: CPPLintBear, Section: |
Comment on 011c195, file queue/cpp/Queue.h, line 8. private: should be indented +1 space inside class Queue [whitespace/indent] [3] Origin: CPPLintBear, Section: |
Comment on 011c195, file queue/cpp/Queue.h, line 10. public: should be indented +1 space inside class Queue [whitespace/indent] [3] Origin: CPPLintBear, Section: |
60d1164
to
ca428b6
Compare
ca428b6
to
2ddc0aa
Compare
@sangamcse Requested changes have been made. Please take a look :) |
f8706fd
to
112d502
Compare
README.md
Outdated
| [Heap Sort](https://en.wikipedia.org/wiki/Heapsort) | | | | [:octocat:](heap_sort/python) | | ||
| [Maximum Subarray Problem](https://en.wikipedia.org/wiki/Maximum_subarray_problem) | | | | [:octocat:](/maximum_subarray/Python)| | ||
| [Knapsack Problem](https://en.wikipedia.org/wiki/Knapsack_problem) | | | | [:octocat:](knapsack_problem/Python)| | ||
|
||
| [Shell Sort](https://en.wikipedia.org/wiki/Shellsort) | | | | [:octocat:](shell_sort/Python) | |
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.
I know this one conflicting your PR but this needs to be as it is. I merged your last PR knowing that it will be a little tough because of practice. But at this time, you need to understand this git-flow. Rebase your master branch from upstream/master. And then rebase this branch with your local master. I think that should work. Try once.
112d502
to
cae94c0
Compare
README.md
Outdated
@@ -21,10 +21,12 @@ This repository contains examples of various algorithms written on different pro | |||
| [Binary Search](https://en.wikipedia.org/wiki/Binary_search_algorithm) | | [:octocat:](binary_search/Cpp) | | [:octocat:](binary_search/Python) | | |||
| [Bubble Sort](https://en.wikipedia.org/wiki/Bubble_sort) | [:octocat:](bubble_sort/C) | [:octocat:](bubble_sort/Cpp) | [:octocat:](bubble_sort/Java) | | | |||
| [Shell Sort](https://en.wikipedia.org/wiki/Shellsort) | [:octocat:](shell_sort/C) | | | [:octocat:](shell_sort/Python) | | |||
| [Bubble Sort](https://en.wikipedia.org/wiki/Bubble_sort) | [:octocat:](bubble_sort/C) | [:octocat:](bubble_sort/Cpp) | | | |
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.
Whats the reason of adding this line along with the unneccessary change of line 28? Can you cross check your changes in README?
This adds Selection Sort algorithm written in C Closes NITSkmOS#145
cae94c0
to
435f884
Compare
ack 435f884 |
@sangamcse rebase |
Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently |
Automated rebase with GitMate.io was successful! 🎉 |
This adds Selection Sort algorithm written in C
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!
Closes #145
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.