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

Update stack_using_linked_lists.c #620

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Shwetik
Copy link
Contributor

@Shwetik Shwetik commented Sep 30, 2020

Description of Change

Added comments and time complexities.

  • Relevant documentation/comments is changed or added

Added comments and time complexities.
@Panquesito7 Panquesito7 added the enhancement New feature or request label Sep 30, 2020
Copy link
Contributor Author

@Shwetik Shwetik left a comment

Choose a reason for hiding this comment

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

Changes made.

@@ -36,40 +36,47 @@ int main()
}
}

void push(struct node *p)
/**
* push function will add a new node at the head of the list, time complexity O(1).
Copy link
Member

Choose a reason for hiding this comment

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

Missing parameter documentation.
Same in other parts of the code.

Copy link
Contributor Author

@Shwetik Shwetik left a comment

Choose a reason for hiding this comment

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

Changes made.

{
int item;
struct node *temp;
temp = (struct node *)malloc(sizeof(struct node));
temp = (struct node *)malloc(sizeof(struct node));
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this empty whitespace.
Same in other parts of the code.

Suggested change
temp = (struct node *)malloc(sizeof(struct node));
temp = (struct node *)malloc(sizeof(struct node));

Copy link
Contributor Author

@Shwetik Shwetik left a comment

Choose a reason for hiding this comment

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

Whitespaces removed.

Panquesito7
Panquesito7 previously approved these changes Sep 30, 2020
Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

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

LGTM, good work. 👍 😄

data_structures/linked_list/stack_using_linked_lists.c Outdated Show resolved Hide resolved
data_structures/linked_list/stack_using_linked_lists.c Outdated Show resolved Hide resolved
data_structures/linked_list/stack_using_linked_lists.c Outdated Show resolved Hide resolved
@Panquesito7 Panquesito7 added Admin views requested Requesting opinions from Maintainers and Admins of the repo. approved Approved; waiting for merge labels Sep 30, 2020
Shwetik and others added 3 commits October 1, 2020 05:19
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
@kvedala
Copy link
Collaborator

kvedala commented Oct 1, 2020

#619 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin views requested Requesting opinions from Maintainers and Admins of the repo. approved Approved; waiting for merge enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants