     if string1.characters.count != string2.characters.count {
         return false
     }
-    return sort(string1) == sort(string2)
+    return sort(string: string1) == sort(string: string2)
 }
 
 func sort(string: String) -> String {
     let content = [Character](string.characters)
-    return String(content.sort(){$0 < $1})
+    return String(content.sorted(){$0 < $1})
 }
 
 //: Solution #2:


var rotated = [12,14,18,21,3,6,8,9]
var rotated2 = [-3,-2,-1,1,3,6,7,8,-5]
let result1 = findElementInRotatedArray(rotated, x: 9)
print("The x element is at index: \(result1)")

let result2 = findElementInRotatedArray(rotated2, x: -5)
print("The x element is at index: \(result2)")


//: 4. Given an array that contains numbers from 1 to n-1 and exactly 1 duplicate, find that duplicate.

                  [1,0,1,1],
                  [1,0,1,1]]

setZeros(matrix: &testMatrix)

func printMatrix(matrix: [[Int]]) {
    for row in 0..<matrix.count {
