 
 //: Assuming the input is sorted it will return two arrays.
 
-enum WrongInputError: ErrorType {
+enum WrongInputError: Error {
     case NotDivisible
 }
 

        Swift.print("")
    }
}
printMatrix(testMatrix)

//: New Stuff for Kal

/*: 6. Given two sequences, print longest common subsequence LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of length 3. LCS for input Sequences “AGGTAB” and “GXTXAYB” is “GTAB” of length 4.
*/








var rotated = [12,14,18,21,3,6,8,9]
var rotated2 = [-3,-2,-1,1,3,6,7,8,-5]
let result1 = findElementInRotatedArray(array: rotated, x: 9)
//print("The x element is at index: \(result1)")
//
//let result2 = findElementInRotatedArray(array: 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.
