Ad
  • Custom User Avatar

    The solution shows the numbers in the array being doubled not squared.

  • Custom User Avatar

    Doesn't this return an array of the elements squared? I thought they were supposed to be doubled.

  • Custom User Avatar

    I think there's something wrong with this solution!

  • Custom User Avatar

    I've been having plenty of Swift 4 vs. Swift 3.1.1 issues. Great practice in both versions of Swift and building my own tests. Keep on swimming.

    Swift 3: myString.characters.count
    Swift 4: myString.count

    Remember that Swift 4 String is collection of Characters, but Swift 3 is not. (see "string".characters) These plus other testing issues may block success.

  • Custom User Avatar

    Yes. Those characters must be dealt with by ignoring them. (a problem I had with the final submission)

    ex: "++st+" would mean incrementing memory by 3.
    ex: "+++" would mean incrementing memory by 3.

    Athough I believe the submission tests did not have the following input (in Swift), i believe the algorythm should also be able to handle super long increment input like:

    "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"

    This above is 528 increments... which should be the letter "H". (Hint, modulo)