Skip to content

Conversation

@Bitaman
Copy link

@Bitaman Bitaman commented Feb 28, 2019

No description provided.

@jessicacaley
Copy link

Hi Bita! I really enjoyed your solution here -- it was easy to track logically and was different from my own solution. One thing that stood out to me as interesting was how you used your index to see if the arrays were the same all the way through: if, at any point, they weren't equal, the loop would break and the index would stop increasing, so the length of the array wouldn't equal the index value in the end and it would return false. Another way you could structure that would be to immediately return false if the two values weren't equal in the loop, and then if the loop completed successfully, to return true. Not a suggestion for improvement (your code works perfectly well), just a different way to think about it. Great solution overall!

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