Skip to content

Commit 23fc221

Browse files
authored
Merge pull request kodecocodes#771 from askari01/master
[Swift 4.2] 2 Sum Problem
2 parents 78ebf95 + f0ce485 commit 23fc221

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

Two-Sum Problem/README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,4 @@ I'm quite enamored by this little algorithm. It shows that with some basic prepr
168168

169169
* [3Sum / 4Sum](https://github.com/raywenderlich/swift-algorithm-club/tree/master/3Sum%20and%204Sum)
170170

171-
*Written for Swift Algorithm Club by Matthijs Hollemans and Daniel Speiser*
171+
*Written for Swift Algorithm Club by Matthijs Hollemans and Daniel Speiser updated to swift 4.2 by Farrukh Askari*

Two-Sum Problem/Solution 1/2Sum.playground/Contents.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
//: Two Sum
2-
// Last checked with: Version 9.0 (9A235)
3-
#if swift(>=4.0)
4-
print("Hello, Swift 4!")
5-
#endif
2+
// Last checked with: Version 10.0 (10A255)
63

74
func twoSum(_ nums: [Int], target: Int) -> (Int, Int)? {
85
var dict = [Int: Int]()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Two-Sum Problem/Solution 2/2Sum.playground/Contents.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
//: Playground - noun: a place where people can play
2-
// Last checked with: Version 9.0 beta 4 (9M189t)
3-
#if swift(>=4.0)
4-
print("Hello, Swift 4!")
5-
#endif
2+
// Last checked with: Version 10.0 (10A255)
63

74
func twoSumProblem(_ a: [Int], k: Int) -> ((Int, Int))? {
85
var i = 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)