-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Enhancements for stack implementation using slice #544
Conversation
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 have a few general thoughts that I think might actually be better for this implementation.
First thing to note is that there is already an implementation of Stack. This means that to make this into a really self contained package, I think you should create an interface
that both implementations adhere to and expose only the interface outside the package, but this is non-blocking.
The comment is blocking however.
5260991
to
67b4562
Compare
package stack | ||
|
||
import ( | ||
"container/list" |
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.
Please use our internal data structures when creating new ones. Using container
package hides a lot of material that could be used for learning.
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.
This code was already present (I just renamed the file). Since there is another implementation using linked list, shall I remove this one?
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.
Keep it there, but create a new Issue to fix this 🙏🏼
b7f0806
to
3268f14
Compare
} | ||
}) | ||
|
||
st.Pop() |
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.
This needs to be checked. Please fix all the listing and styling errors raised by the CI.
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This PR was closed because it has been stalled for 7 days with no activity. |
Closes #543