You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code below count should only be incremented when a new color is added to the
set, but we are incrementing every time through the loop, which means we almost always return False. This actually causes problems when making GIFs with diagrams since they often have less than 256 colors. A fix is below which i think is fine since Set.size is O(1)
In the code below
count
should only be incremented when a new color is added to theset, but we are incrementing every time through the loop, which means we almost always return
False
. This actually causes problems when making GIFs with diagrams since they often have less than 256 colors. A fix is below which i think is fine sinceSet.size
is O(1)The text was updated successfully, but these errors were encountered: