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

Solutions for 1 and 2 #14

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

Solutions for 1 and 2 #14

wants to merge 2 commits into from

Conversation

jjousun
Copy link

@jjousun jjousun commented Apr 27, 2017

No description provided.

a << a[og_length - (i+ 1)]
end
return a
end

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

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

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!

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