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.
Can you give examples of when they don't work?
For Swift
let longRoutes = [["San Policarpo", "Oras"], ["Balangiga", "Lawaan"], ["Borongan", "Maydolong"], ["Jipapad", "Maslog"], ["Balangkayan", "Llorente"], ["Mercedes", "Guiuan"], ["Taft", "Sulat"], ["Sulat", "San Julian"], ["Arteche", "San Policarpo"], ["Oras", "Dolores"], ["Dolores", "Can-avid"], ["Can-avid", "Taft"], ["San Julian", "Borongan"], ["Maydolong", "Balangkayan"], ["Llorente", "Hernani"], ["Hernani", "General MacArthur"], ["General MacArthur", "Giporlos"], ["Giporlos", "Balangiga"], ["Lawaan", "Salcedo"], ["Salcedo", "Mercedes"], ["Maslog", "Arteche"]]
XCTAssertEqual(findRoutes(routes: longRoutes), "Jipapad, Maslog, Arteche, San Policarpo, Oras, Dolores, Can-avid, Taft, Sulat, San Julian, Borongan, Maydolong, Balangkayan, Llorente, Hernani, General MacArthur, Giporlos, Balangiga, Lawaan, Salcedo, Mercedes, Guiuan")
Your code does not work properly when the number you are considering is a legitimate
0
, in which case you just use the default value.[I would also just use a
.reduce()
without using any mapping for performances - really no point in creating temporary variables here -, but that is as a side note.]You're absolutely right, thanks for spotting. It looks like another user has already managed to edit it somehow so should be all good now
yes, corrected.
Usually waiting for a few minutes will work.
Except when it doesn't, but that's also a known CW issue: https://github.com/Codewars/codewars.com/issues/1114
Fixed
Do you even know what
X to the power of Y
means?Do you only speak when asked for an opinion? Judging from the comment above, clearly not.
This comment is hidden because it contains spoiler information about the solution
I've updated the description accordingly.
For your request, please see ff:
Not an issue. Problems coming from your code should be raised as a question ;-)
Also, 2970 is an ore number.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...