Re: Grid Folding (#63)

Here’s my solution. Looks like it didn’t get from google to the
mailing list. I used arrays within arrays as well. I wrote my own
loops to do the folding. I see now I could have done it much more
succinctly. I went for all the extra credit. Can unfold by noticing
the last element of the array hasn’t been folded over and the first
element was previously unfolded. The direction from the first to the
last element gives the fold direction. Then just keep cutting off
the first half of the array successively gives the array to get the
next unfold direction from. Should be quite fast and check_fold.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs