about | help | code help+videos | done | prefs |
Take a piece of paper and fold it in half. Unfold it and there is one fold, which we'll signify with a "1". (A fold in the opposite direction would be a "0") If you fold the paper twice it will have three folds when you unfold it, and they will be in a "110" pattern. Fold a piece of paper three times, and you will see "1101100" as the sequence of folds. You should use the onesComplement and reverse functions as "helper" functions in your solution. See https://en.wikipedia.org/wiki/Regular_paperfolding_sequence for an illustration. (Adapted from Roger Frank). regularPaperFold(1) → "1" regularPaperFold(2) → "110" regularPaperFold(3) → "1101100" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy