Skip to content

implemented stacks in python class - #10

Open
codesankalp wants to merge 1 commit into
masterfrom
stack
Open

implemented stacks in python class#10
codesankalp wants to merge 1 commit into
masterfrom
stack

Conversation

@codesankalp

Copy link
Copy Markdown
Owner

close #2

Comment thread dsalgo/stack.py
return
popped_element = holder_stack.pop()
_reverse_stack_recursion(stack, holder_stack)
stack.push(popped_element) No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Need a new line here

Comment thread dsalgo/stack.py


class Stack_using_linked_list:
"""Implementation of Stack using Linked List"""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Write it like this:
'''
Implementation of Sta.....
''''

Comment thread dsalgo/stack.py
def __init__(self):
self.head = None
self.num_elements = 0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think that two blank lines should be added in function of same class. Can you please verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Stacks

2 participants