Skip to content

Commit

Permalink
[Array] change swap to generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi Gu committed Sep 8, 2016
1 parent 14548a7 commit a3ea229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Array/RotateArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class RotateArray {
}
}

private func _swap(inout nums: [Int], _ p: Int, _ q: Int) {
private func _swap<T>(inout nums: Array<T>, _ p: Int, _ q: Int) {
var temp = nums[p]
nums[p] = nums[q]
nums[q] = temp
Expand Down

0 comments on commit a3ea229

Please sign in to comment.