Closed
Description
In the Julia and C implementations, the color
function checks if the point is inside bounds and if old_val == new_val
.
These conditions are already checked in the find_neighbours
function. So the points which are passed to color
will always satisfy these conditions.The conditions are totally unnecessary.
color
can simply be:
def color(canvas, p, new_val):
canvas[p] = new_val
Metadata
Metadata
Assignees
Labels
No labels