Conversation
|
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! |
No description provided.