Skip to content

feat: add solutions to lc problem: No.0281 #4485

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 4 commits into from
Jun 12, 2025
Merged

Conversation

taoyq1988
Copy link
Member

No.0281.Zigzag Iterator

@taoyq1988 taoyq1988 requested a review from yanglbme June 12, 2025 04:04
@taoyq1988 taoyq1988 self-assigned this Jun 12, 2025
@idoocs idoocs added go Issues or Pull requests relate to .go code core team Issues or pull requests from core team md Issues or Pull requests relate to .md files labels Jun 12, 2025
@yanglbme
Copy link
Member

Hello, the Go code template for Leetcode problem 281 is as follows. The code you provided does not match the problem's requirements, so I’ve made some modifications. The main change is related to the capitalization of function names.

type ZigzagIterator struct {
    
}

func Constructor(v1, v2 []int) *ZigzagIterator {
    
}

func (this *ZigzagIterator) next() int {
    
}

func (this *ZigzagIterator) hasNext() bool {
	
}

/**
 * Your ZigzagIterator object will be instantiated and called as such:
 * obj := Constructor(param_1, param_2);
 * for obj.hasNext() {
 *	 ans = append(ans, obj.next())
 * }
 */

@yanglbme yanglbme merged commit 2d63f55 into doocs:main Jun 12, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core team Issues or pull requests from core team go Issues or Pull requests relate to .go code md Issues or Pull requests relate to .md files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants