-
-
Notifications
You must be signed in to change notification settings - Fork 359
Flood Fill in C #741
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 in C #741
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 think I should split the stack and queue methods here into a separate chapter specifically for stacks and queues. I think including data structures developed in the AAA should be fine, right?
I am happy to merge this, but might wait a second to see if there's discussion
|
||
All Julia code snippets for this chapter rely on an exterior `color!(...)` function, defined as |
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 had this line separate because I was afraid that some languages would not be able to create a separate color function, but I you are right, we can say this in general
|
||
struct canvas { | ||
int max_x, max_y; | ||
int *data; |
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.
Why int
instead of double
?
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.
We aren't using floating point numbers, we are just changing the 0s to 1s.
queue_fill(c2, start_loc, 0, 1); | ||
pass_cnt += grid_cmp(grid2, answer_grid, 25); | ||
|
||
printf("Test Summary: | Pass\tTotal\n"); |
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 am a fan of how this is written out 💯
No description provided.