Skip to content

Instantly share code, notes, and snippets.

@boska
Created April 27, 2017 08:15
Show Gist options
  • Select an option

  • Save boska/c2d3e1ea830762d869d535e73da03565 to your computer and use it in GitHub Desktop.

Select an option

Save boska/c2d3e1ea830762d869d535e73da03565 to your computer and use it in GitHub Desktop.
//
// 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