Ad
  • Custom User Avatar

    Fixed although the bug was voluntary so people know that Swift needs arguments labels...

  • Custom User Avatar

    You can work around the problem by adding empty arugemnt labels in your solution. Just change first line to:

    func race(_ v1: Int, _ v2: Int, _ g: Int) -> [Int]? {

  • Custom User Avatar

    The function is not called correctly in Swift. I fixed the once for "Test" phase but they need to be fixed for the "Attempt" phase.

    main.swift:14:23: error: missing argument labels 'v1:v2:g:' in call
    XCTAssert(race(v1, v2, g)! == expected!, "should return (expected!)")
    ^
    v1: v2: g:
    main.swift:17:27: error: missing argument labels 'v1:v2:g:' in call
    XCTAssertTrue(race(v1, v2, g) == nil, "Should return nil")
    ^
    v1: v2: g:

  • Custom User Avatar

    I Finally got It!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I feel like this shouldnt of been so hard but i think I was tired last night trying to do it. fresh mind made all the difference.