Created
April 27, 2017 08:15
-
-
Save boska/c2d3e1ea830762d869d535e73da03565 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // MaxiumFourDigits.swift | |
| // Find the maximum valid time that can be displayed on a digital | |
| // clock using four given digits. | |
| // leetcode | |
| // | |
| // Created by boska on 10/02/2017. | |
| // Copyright © 2017 boska. All rights reserved. | |
| // | |
| import Foundation | |
| import XCTest | |
| func maxiumFourDigits(_ digits: [Int]) -> [Int] { | |
| var result: [Int] = [] | |
| return result | |
| } | |
| class maxiumFourDigitsTests: XCTestCase { | |
| func test() { | |
| XCTAssertEqual(maxiumFourDigits([1, 8, 3, 2]), [2, 3, 1, 8]) | |
| XCTAssertEqual(maxiumFourDigits([2, 4, 0, 0]), [2, 0, 4, 0]) | |
| XCTAssertEqual(maxiumFourDigits([1, 8, 3, 2]), [2, 3, 1, 8]) | |
| XCTAssertEqual(maxiumFourDigits([1, 8, 3, 2]), [2, 3, 1, 8]) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment