-
-
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
optimized stack array implementation #658
optimized stack array implementation #658
Conversation
11-aryan
commented
Sep 29, 2023
- Optimized the push operation by appending to the last element of the array instead of copying the whole array
- Removed the global variable stackArray and created a struct StackArray for it
- Modified stack_test.go file to reflect these changes
Hi, |
Can the code style tests that failed be resolved by running gofmt -s -w stackarray.go ? |
Yes they can be fixed that way. |
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 export all the methods and convert the tests into black box ones.
Could you please elaborate what exactly should be black boxed and in what way ? |
In go, you can write tests either in the |
Oh, got it! Thanks for the explanation |