-
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
stack.c: Add stack using array in C #315
Conversation
stack/C/stackUsingArray.c
Outdated
if(*top == -1) { | ||
printf("\n Stack empty!\n"); | ||
exit(1); | ||
} |
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.
Weird number of spaces at line-start. Are you using a 2-space indent? [whitespace/indent] [3]
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.
I tried fixing this in f487f89 commit.
I tried my best to follow the strict indentation guidelines. But, I don't know if I'll ever be able to make though a single PR. I hope you'll fix the indentation problem. Thank you. |
Cool. Now you need to squash your commits into one. You can take help from https://github.com/NITSkmOS/Algorithms/blob/master/GIT_BASICS.md |
461f386
to
2c61773
Compare
Added stack data structure code in C. Closes NITSkmOS#315
Added stack data structure code in C. Closes NITSkmOS#315
Add stack data structure code in C. Closes NITSkmOS#315
Add stack data structure code in C. Closes NITSkmOS#315
The code is modular and simple to understand for a newbie.
Stack is an ordered list of similar data type. Stack is a LIFO(Last in First out) structure or we can say FILO(First in Last out). push() function is used to insert new elements into the Stack and pop() function is used to remove an element from the stack.
Fixes #40
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.