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

Branches - Erika #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Branches - Erika #47

wants to merge 2 commits into from

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.

@@ -1,5 +1,28 @@
# Determines if the two input arrays have the same count of elements
# 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