Skip to content

Conversation

@Gathros
Copy link
Contributor

@Gathros Gathros commented Aug 4, 2020

No description provided.

@Gathros Gathros added the Implementation This provides an implementation for an algorithm. (Code and maybe md files are edited.) label Aug 4, 2020
Copy link
Member

@leios leios left a 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

[import:180-195, lang:"c"](code/c/flood_fill.c)
{% endmethod %}

All Julia code snippets for this chapter rely on an exterior `color!(...)` function, defined as
Copy link
Member

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;
Copy link
Member

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?

Copy link
Contributor Author

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");
Copy link
Member

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 💯

@leios leios merged commit 5da3ae8 into algorithm-archivists:master Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Implementation This provides an implementation for an algorithm. (Code and maybe md files are edited.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants