• ###### jimababacommented on "Don't give me five!" swift solution

conversion to string and lookup in it can't be efficient

• ###### jimababacommented on "Don't give me five!" swift solution

looks like String(bool) comparison against "true"

• ###### msc22commented on "Heron's formula" swift solution

There is no precision for the output of 2 digits implemented

• ###### dutysnipercommented on "Playing with digits" swift solution

u can replace String(number).characters to numbers.description.compactMap { \$0 }

cheater)))))

• ###### 4500zenja1commented on ""Number Of Occurrences" Swift Translation"

More random tests should be better (like, 10-20).

amazing.

• ###### Awesome A.D.commented on "Triangular Treasure" swift solution

It's literally in the title of this kata, and in the description:
Trianguluar Numbers

• ###### Kshama06commented on "Triangular Treasure" swift solution

This comment is hidden because it contains spoiler information about the solution

• ###### Shakhboz2021commented on "Triangular Treasure" swift solution

How you created formulae for this sequence of numbers

• ###### timar07commented on "Sum of Digits / Digital Root" swift solution

Damn! That's genious

• ###### SergeyTLVcommented on "Playing with digits" swift solution

Nice and elegant solution!
But doesn't work with swift5.
Consider to delete ".characters"

• ###### naitharcommented on "Descending Order" swift solution

What do you mean by "optimization"?
Both `.description` and `String()` work the same way for integers - String initializer, Integer description

Edit:
Oh, I've noticed what you meant - `number.description.sorted {...}`? Not sure about optimization, but easier to read for sure.

• ###### stevez00commented on "Triangular Treasure" swift solution

This is the easiest to read. I just used a regular if statement though.

• ###### IgorChernyshovcommented on "Descending Order" swift solution

Looks good. You can optimize this by replacing String(number).characters with number.description