Ad
  • Default User Avatar
  • Default User Avatar

    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.

  • Default User Avatar

    the factorial is overflowing at some point. Try using 100, 200 and 1000. They're using numbers this large in their test cases

  • Default User Avatar

    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)

  • Default User Avatar

    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 {
    ...
    }
    }

  • Default User Avatar

    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)
    }