Skip to content

Conversation

@emaust
Copy link

@emaust emaust commented Sep 5, 2019

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.

You should run the tests here, this isn't working in many cases. Take a look at my comments and let me know any questions you have.

# and the same integer values in the same exact order
def array_equals(array1, array2)
raise NotImplementedError

Choose a reason for hiding this comment

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

You should check to see if the arrays are both nil first. You can't for example do .each on a `nil.

if array1[index] != array2[index]
match = false
end
return match

Choose a reason for hiding this comment

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

This will cause the loop to exit after 1 iteration. So if the 1st elements are the same it will return true.

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