-
Notifications
You must be signed in to change notification settings - Fork 20
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
Solutions for 1 and 2 #14
base: master
Are you sure you want to change the base?
Conversation
a << a[og_length - (i+ 1)] | ||
end | ||
return a | ||
end |
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.
This was supposed to create a new array, not modify the original array - otherwise, looks good.
# end | ||
# end | ||
# return a | ||
# end |
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.
You can. I'd just call this ruby shorthand, not ruby magic.
👍
end | ||
end | ||
return a | ||
end |
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.
There are some ways that you could have shortened up this code without having to handle odd/even cases separately, but looks like it works!
No description provided.