-
Notifications
You must be signed in to change notification settings - Fork 47
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
Ports -- Kate #39
base: master
Are you sure you want to change the base?
Ports -- Kate #39
Conversation
Nice job! Our approach is very similar. I realized after I submitted it that it can be a lot less verbose, but this makes a lot of sense when using the test results to solve the problem. |
FYI: ask a TA about using Warning: be very careful with this command, as it can permanently delete git history. (It's pretty much the most dangerous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Was able to find your code here.)
LGTM other than a style nit or two. 👍 Can you add complexity analysis as well? 🙂
lib/array_equals.rb
Outdated
raise NotImplementedError | ||
end | ||
i = 0 | ||
if (array1 == nil) && (array2 == nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: these if
statements are a bit redundant - how about combining some of them, e.g:
if (array1 == nil && array2 == nil) {
return true;
} elsif (array1 == nil || array2 == nil) {
return false;
}
...
lib/array_equals.rb
Outdated
return false | ||
elsif array1.length != array2.length | ||
return false | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny nit: the else
is redundant here. You can move this inner block out of it. 🙂
No description provided.