Skip to content

Commit

Permalink
2 sum problem with swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
askari01 committed Oct 6, 2018
1 parent f08d5fc commit 2d60bb7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
5 changes: 1 addition & 4 deletions Two-Sum Problem/Solution 1/2Sum.playground/Contents.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//: Two Sum
// Last checked with: Version 9.0 (9A235)
#if swift(>=4.0)
print("Hello, Swift 4!")
#endif
// Last checked with: Version 10.0 (10A255)

func twoSum(_ nums: [Int], target: Int) -> (Int, Int)? {
var dict = [Int: Int]()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
5 changes: 1 addition & 4 deletions Two-Sum Problem/Solution 2/2Sum.playground/Contents.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//: Playground - noun: a place where people can play
// Last checked with: Version 9.0 beta 4 (9M189t)
#if swift(>=4.0)
print("Hello, Swift 4!")
#endif
// Last checked with: Version 10.0 (10A255)

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

0 comments on commit 2d60bb7

Please sign in to comment.