File tree 5 files changed +27
-0
lines changed
Fizz Buzz/FizzBuzz.playground
Palindromes/Palindromes.playground
5 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ // last checked with Xcode 9.0b4
2
+ #if swift(>=4.0)
3
+ print ( " Hello, Swift 4! " )
4
+ #endif
5
+
1
6
func fizzBuzz( _ numberOfTurns: Int ) {
2
7
for i in 1 ... numberOfTurns {
3
8
var result = " "
Original file line number Diff line number Diff line change 1
1
//: Playground - noun: a place where people can play
2
2
3
+ // last checked with Xcode 9.0b4
4
+ #if swift(>=4.0)
5
+ print ( " Hello, Swift 4! " )
6
+ #endif
7
+
3
8
// Recursive version
4
9
func gcd( _ a: Int , _ b: Int ) -> Int {
5
10
let r = a % b
Original file line number Diff line number Diff line change 1
1
//: Playground - noun: a place where people can play
2
2
3
+ // last checked with Xcode 9.0b4
4
+ #if swift(>=4.0)
5
+ print ( " Hello, Swift 4! " )
6
+ #endif
7
+
3
8
import Foundation
4
9
5
10
/**
Original file line number Diff line number Diff line change
1
+
2
+ // last checked with Xcode 9.0b4
3
+ #if swift(>=4.0)
4
+ print ( " Hello, Swift 4! " )
5
+ #endif
6
+
1
7
/*
2
8
Queue
3
9
Original file line number Diff line number Diff line change
1
+
2
+ // last checked with Xcode 9.0b4
3
+ #if swift(>=4.0)
4
+ print ( " Hello, Swift 4! " )
5
+ #endif
6
+
1
7
/*
2
8
Stack
3
9
You can’t perform that action at this time.
0 commit comments