Skip to content

Commit b1efd5e

Browse files
committed
add github page10
1 parent d17ab40 commit b1efd5e

4 files changed

Lines changed: 3089 additions & 431 deletions

File tree

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import Foundation
22

3-
4-
5-
6-
var array = [3, 4, 5, 1, 2]
7-
3+
func singleNumber1(_ nums: [Int]) -> Int {
4+
var x = nums[0]
5+
for i in 1..<nums.count {
6+
x = x^nums[i]
7+
}
8+
return x
9+
}
10+
11+
var array = [2,2,1]//[0,0,1,1,1,2,2,3,3,4]
12+
print(singleNumber1(array))

0 commit comments

Comments
 (0)