Skip to content

java: add solutions for year 2016, day 21 #113

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

Merged
merged 3 commits into from
Jan 12, 2020
Merged

java: add solutions for year 2016, day 21 #113

merged 3 commits into from
Jan 12, 2020

Conversation

saser
Copy link
Owner

@saser saser commented Jan 12, 2020

This was fairly easy. It was a fun exercise in doing array manipulation -- especially the move had me thinking a little while.

For part 2, all operations except "rotate based on letter" were trivial to reverse. For "rotate based on letter", I just created a table of all possible "before" and "after" indices, and created some logic based on that.

@saser saser merged commit 5fad405 into master Jan 12, 2020
@saser saser deleted the java/2016/21 branch January 12, 2020 17:02
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.

1 participant