Skip to content

Added Golang solutions of 'Two Pointers' tasks #75

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

Merged
merged 2 commits into from
Feb 26, 2025

Conversation

lysunkin
Copy link
Contributor

Description

Added Golang solutions of 'Two Pointers' tasks

Copy link
Collaborator

@Destiny-02 Destiny-02 left a comment

Choose a reason for hiding this comment

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

Hi @lysunkin, thank you for creating a PR to the Go solutions.

To ensure consistency, please reformat each file to match the structure and conventions of the existing Go solutions for the Hash Maps and Sets chapter.

In addition, please ensure the code follows the same algorithm, variables names, etc.
as the original Python solutions.

FYI, @es-codigo has already opened a PR for some of the solutions in the Two Pointers chapter, so it might be better to work on a different chapter to avoid duplicate work.

You can view more guidelines about contributing to the repository here.

Signed-off-by: Slava Lysunkin <lysunkin@gmail.com>
@lysunkin
Copy link
Contributor Author

@Destiny-02 thanks for your review. I've aligned my PR with the requirements.
I'll be working on other Golang examples as well.

@@ -0,0 +1,30 @@
func isAlnum(r rune) bool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this function be moved below the isPalindromeValid function?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same for next_lexicographical_sequence.go

return []int{left, right}
}
}
return []int{}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have decided to use nil instead of []int{} for Go. You can check the conversation here: #56 (comment)

Signed-off-by: Slava Lysunkin <lysunkin@gmail.com>
@lysunkin lysunkin requested a review from Destiny-02 February 25, 2025 18:23
Copy link
Collaborator

@Destiny-02 Destiny-02 left a comment

Choose a reason for hiding this comment

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

Thanks again for contributing to the Go solutions!

@Destiny-02 Destiny-02 merged commit 5feba01 into ByteByteGoHq:main Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants