Created
January 17, 2020 14:41
-
-
Save AppleCEO/3267715ea7dc4058e554ccc732c48306 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
| func solution(_ x:Int, _ n:Int) -> [Int64] { | |
| let result = Array<Int>.init(repeating: 0, count: n) | |
| var index = 0 | |
| return result.map { (_) -> Int64 in | |
| index += 1 | |
| return Int64(index*x) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment