Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
natan,
I don't know how this test case worked but... "Attempt" did trigger this issue (0112 -> 2110). So if you ask me to remeasure (I couldn't, because "Attempt" blocked me from submission due to failure).
But as i mentioned... treating an Int in swift or Java, 0112 is the same as 112 (This happens before conversion of string). I would propose if we do find it, we should remove it.
http://onlineswiftplayground.run/
It doesn't seem to matter if it's string or not, the simple test here seems to show otherwise.
var test1 = 0122
var test2 = 122
print("Test one values (test1)") < -- "122"
print("Test Two values (test2)") <-- "122"
print(test1 == test2) <-- True
I just want to check, if my answer is incorrect. It seems that swift Int, removes leading zero by default.. So one test doesn't work:
0112 -> 2110
It seems that leading zero is removed in swift by default, hence 0112 when assigned is changed to 112. I want to know if anyone else dealt with this before (I've even used playground in swift to check)