Skip to content
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

Flood Fill #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Flood Fill #28

wants to merge 1 commit into from

Conversation

rihib
Copy link
Owner

@rihib rihib commented Sep 2, 2024

Flood Fillを解きました。レビューをお願い致します。

問題:https://leetcode.com/problems/flood-fill/
言語:Go

すでに解いている方々:
colorbox/leetcode#11

originalColorcolorが同じ場合、無限ループになってしまうので、下記の部分が必要。

	if originalColor == color {
		return image
	}

@colorbox
Copy link

colorbox commented Sep 3, 2024

再帰ではないパターンで解いてみるとよさそうです。
step2, step3は未コミットでしょうか?

@rihib
Copy link
Owner Author

rihib commented Sep 4, 2024

@colorbox 特に変更点がなかったので出してないです。再帰を使わないバージョンも確かにやっといたほうが良さそうですね

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.

4 participants