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.
Duplicate issue above with more detail
Swift
Which language?
When I execute my solution, it tells me the server timed out (12000ms). But I run the code in my computer and takes less than 1ms and actually the server logs say:
Example Tests:
Completed in 0.7ms
Simple Tests:
Completed in 0.5051ms
Depending on the attempt, the tests get further up to Normal Test or even Long tests. I'm event printing the system time in nanoseconds and the tests are executed extremely fast, I do not understand what's wrong.
the factorial is overflowing at some point. Try using 100, 200 and 1000. They're using numbers this large in their test cases
For all those Swift developers finding compilation errors in the Server tests, just add the code yourselves. In this case, it works for me by adding
var Base64Chars: [UInt8] = Array("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".utf8)
Hi Tayo. I had the same issue. Try adding this code:
var Base64Chars: [UInt8] = Array("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".utf8)
extension String {
public var toBase64: String {
...
}
public var fromBase64: String {
...
}
}
Test cases don't compile on Swift, can't find 'superStreetFighterSelection' variable. It's so frustrating when you've spent some time solving this kata to find out a bit later that you won't pass it. It's happened to me before.
main.swift:58:19: error: use of unresolved identifier 'superStreetFighterSelection'
XCTAssertEqual(superStreetFighterSelection(fighters: SolutionTest.fighters1, position: test.1, moves: test.2), test.3, test.0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
solution.swift:1:6: note: did you mean 'streetFighterSelection'?
func streetFighterSelection(fighters: [[String]], position: (row: Int, column: Int), moves: [Direction]) -> [String] {
Anyone having this issue, add this code so that it compiles:
func superStreetFighterSelection(fighters: [[String]], position: (row: Int, column: Int), moves: [Direction]) -> [String] {
return streetFighterSelection(fighters: fighters, position: position, moves: moves)
}