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

Leaves - Kristina #10

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

Leaves - Kristina #10

wants to merge 1 commit into from

Conversation

krismosk
Copy link

@krismosk krismosk commented Apr 5, 2020

No description provided.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This doesn't work, did you forget to commit some changes?

dislikes.each_with_index do |neighbors, node|
if !graph[node]
graph[node] = colors[current_color += 1]
unless dfs(dislikes, node, painted_graph, current_color, colors)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting un unknown variable or method painted_graph.

def dfs(dislikes, current_node, graph, current_color, colors)

neighbors = dislikes[current_node]
next_color = (current_color + 1) % colors.length

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get a divide by zero error here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants