diff --git a/.DS_Store b/.DS_Store new file mode 100755 index 0000000..042cd70 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 8615121..cbf3e07 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.DS_Store + # Xcode # build/ diff --git a/HWFrom1-17-16(Lists and Sorts).playground/Contents.swift b/HWFrom1-17-16(Lists and Sorts).playground/Contents.swift index 13cc14e..d558a58 100644 --- a/HWFrom1-17-16(Lists and Sorts).playground/Contents.swift +++ b/HWFrom1-17-16(Lists and Sorts).playground/Contents.swift @@ -2,8 +2,6 @@ import UIKit -var str = "Hello, playground" - /* @@ -11,16 +9,163 @@ Work on your solutions here. Link: https://docs.google.com/document/d/1INvOynuggw69yLRNg3y-TPwBiYb3lQZQiFUOxZKBwsY/edit#heading=h.za36ai6n5fth -1) - - - -2) - - - -3) - +1) */ + +func sudokuSpaceOptions(board: [[Int?]], x: Int, y: Int) -> [Int] { + + // for our purposes x is the horizontal axis and y the vertical + // for this to make sense with the visual layout of the array of arrays + // we need to index the numbers like so: number[y][x] + + //check if !nil + if board[y][x] != nil { + + // if !nil return the number that is already there as the single member of + // the return array + return [board[y][x]!] + } + + var possibilities: Set = Set([1, 2, 3, 4, 5, 6, 7, 8, 9]) + + // check column + for i in 0...8 { + + if board[i][x] != nil { + + // exclude numbers in column + possibilities.remove(board[i][x]!) + } + } + + // check row + for i in 0...8 { + + // exclude numbers in row + if board[y][i] != nil { + + possibilities.remove(board[y][i]!) + } + } + + let indices: [[Int?]] = [[0, 2], [3, 5], [6, 8]] + var xSquareBounds: [Int?] = [nil, nil] + var ySquareBounds: [Int?] = [nil, nil] + + // figure out the square bounds + for numArray in indices { + + if (x >= numArray[0] && x <= numArray[1]) { + + xSquareBounds = numArray + } + if (y >= numArray[0] && y <= numArray[1]) { + + ySquareBounds = numArray + } + } + + // check square + for i in ySquareBounds[0]!...ySquareBounds[1]! { + + for j in xSquareBounds[0]!...xSquareBounds[1]! { + + if board[i][j] != nil { + + // exclude numbers in square + possibilities.remove(board[i][j]!) + } + } + } + + return Array(possibilities) + +} + +var sudokuBoard: [[Int?]] = [ + + [5 , nil, 8 , nil, 7 , 3 , 1 , 9 , nil], + [9 , nil, nil, 6 , nil, nil, 4 , nil, 8 ], + [nil, nil, nil, 9 , nil, 8 , nil, 3 , 5 ], + [nil, 7 , nil, nil, nil, nil, nil, 6 , nil], + [nil, nil, 2 , nil, nil, nil, 9 , nil, nil], + [nil, 1 , nil, nil, nil, nil, nil, 8 , nil], + [1 , 9 , nil, 3 , nil, 6 , nil, nil, nil], + [2 , nil, 3 , nil, nil, 7 , nil, nil, 9 ], + [nil, 8 , 7 , 1 , 9 , nil, 3 , nil, 4 ]] + +print(sudokuSpaceOptions(sudokuBoard, x: 2, y: 6)) +print(sudokuSpaceOptions(sudokuBoard, x: 2, y: 0)) +/* +2) */ + +func rotateMatrixByNinetyDegrees(matrix: [[Int]]) -> [[Int]] { + + // create an array of the same dimensions with all zeroes + var rotated = [[Int]](count: matrix.count, repeatedValue: [Int](count: matrix[0].count, repeatedValue: 0)) + + for i in 0.. [Int] { + + var temp: Int + let indices = [[0,1], [2,3], [0,2], [1,3], [1,2]] + + for i in 0.. nums[indices[i][1]] { + + temp = nums[indices[i][0]] + nums[indices[i][0]] = nums[indices[i][1]] + nums[indices[i][1]] = temp + } + } + + return nums + +} + +var nums = [4, 3, 2, 1] +var nums2 = [4, 3, 1, 2] +var nums3 = [4, 2, 1, 3] +var nums4 = [2, 4, 3, 1] +var nums5 = [3, 4, 1, 2] +var nums6 = [3, 4, 2, 1] +var nums7 = [2, 3, 1, 4] +var nums8 = [3, 2, 4, 1] + +print(sortFourElements(&nums)) +print(sortFourElements(&nums2)) +print(sortFourElements(&nums3)) +print(sortFourElements(&nums4)) +print(sortFourElements(&nums5)) +print(sortFourElements(&nums6)) +print(sortFourElements(&nums7)) +print(sortFourElements(&nums8)) diff --git a/HWFrom1-17-16(Lists and Sorts).playground/contents.xcplayground b/HWFrom1-17-16(Lists and Sorts).playground/contents.xcplayground index 5da2641..9f5f2f4 100644 --- a/HWFrom1-17-16(Lists and Sorts).playground/contents.xcplayground +++ b/HWFrom1-17-16(Lists and Sorts).playground/contents.xcplayground @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/HWFrom1-24(Recursion).playground/Contents.swift b/HWFrom1-24(Recursion).playground/Contents.swift index 1c44504..981e764 100644 --- a/HWFrom1-24(Recursion).playground/Contents.swift +++ b/HWFrom1-24(Recursion).playground/Contents.swift @@ -1,25 +1,50 @@ /* - - Homework link: https://docs.google.com/document/d/1INvOynuggw69yLRNg3y-TPwBiYb3lQZQiFUOxZKBwsY/edit#heading=h.za36ai6n5fth - - - */ +import Foundation //Question 1 - - - - +func fib(n: Int) -> Int { + + var a = 1 + var b = 1 + + for _ in 0.. Int { + let stepCount = Int(arc4random_uniform(3)) - 1 + stepNum += stepCount; + switch(stepCount) { + case -1: print("Ouch \(stepNum)") + case 1: print("Yay \(stepNum)") + default: print("Beep \(stepNum)") + } + return stepCount +} + +func stepUp() { + + switch tryStep() { + case 1: + return + case -1: + stepUp() + stepUp() + default: + stepUp() + } +} + +//Question 3 diff --git a/HWFrom1-24(Recursion).playground/contents.xcplayground b/HWFrom1-24(Recursion).playground/contents.xcplayground index 5da2641..9f5f2f4 100644 --- a/HWFrom1-24(Recursion).playground/contents.xcplayground +++ b/HWFrom1-24(Recursion).playground/contents.xcplayground @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/HWFrom1-30-16(QuickSort+Lists+Queues).playground/Contents.swift b/HWFrom1-30-16(QuickSort+Lists+Queues).playground/Contents.swift index bcf8eda..fc3bd17 100644 --- a/HWFrom1-30-16(QuickSort+Lists+Queues).playground/Contents.swift +++ b/HWFrom1-30-16(QuickSort+Lists+Queues).playground/Contents.swift @@ -1,16 +1,270 @@ //: Playground - noun: a place where people can play +import Foundation + +// FOR REFERENCE, insertion sort +func insertionSort(inout numberList:[Int]){ + var x, y, key : Int + for (x = 0; x < numberList.count; x++) { + + key = numberList[x] + for (y = x; y > -1; y--) { + if (key < numberList[y]) { + numberList.removeAtIndex(y + 1) + numberList.insert(key, atIndex: y) + } + } + } +} + //Answer the questions in the homework below //https://docs.google.com/document/d/1KlK3PmRMybmHS5db_AP11uHXIcbIeM5vHuuAZOV3xME/edit# -//1) +/* 1) + +BUBBLE SORT T: O(n^2), S: O(1) +INSERTION SORT T: O(n^2), S: O(1) +SELECTION SORT T: O(n^2), S: O(1) +MERGE SORT T: O(n log n), S: O(n) +QUICK SORT T: O(n log n), S: O(log n) <- not sure why this space complexity value. Ask in class */ + +/* 2) + +Smaller space complexity */ + +/* 3) */ + +// function to determine a good pivot value +func median(inout array: [Int], first: Int, last: Int) { + + if last - first > 4 { + + var medianIndex: Int + var candidates: [Int] = [array.first!, array[(last+first) / 2], array.last!] + + if (candidates[0] >= candidates[1] && candidates[0] <= candidates[2]) || + (candidates[0] >= candidates[2] && candidates[0] <= candidates[1]) { + + medianIndex = first + + } else if (candidates[1] >= candidates[2] && candidates[1] <= candidates[0]) || + (candidates[1] >= candidates[0] && candidates[1] <= candidates[2]) { + + medianIndex = array.count / 2 + + } else { + + medianIndex = last + } + + if medianIndex != first { + + swap(&array[first], &array[medianIndex]) + } + } +} + +// function to sort values in the array in relation to the pivot point +func partition(inout array: [Int], first: Int, last: Int) -> Int { + + let pivotIndex = first + var rightIndex = last + var leftIndex = pivotIndex + 1 + + while leftIndex <= rightIndex { + + if array[leftIndex] > array[pivotIndex] { + + if array[rightIndex] < array[pivotIndex] { + + swap(&array[rightIndex], &array[leftIndex]) + + } else { + + rightIndex-- + } + + } else { + + leftIndex++ + } + } + + if pivotIndex != rightIndex { + + swap(&array[pivotIndex], &array[rightIndex]) + } + + return rightIndex +} + +// putting everything together for recursive goodness +func quickSort(inout array: [Int], first: Int, last: Int) { + + if last - first <= 0 { + return + } + median(&array, first: first, last: last) + let splitPoint = partition(&array, first: first, last: last) + quickSort(&array, first: 0, last: splitPoint - 1) + quickSort(&array, first: splitPoint + 1, last: last) +} + + +/* 4) */ + +func generateArray(size: Int, valueUpperBound: Int) -> [Int] { + + var array = Array(count: size, repeatedValue: 0) + + for i in 0.. { + + var items: [T] + + init() { + items = [T]() + } -//3) + // push + mutating func push(element: T) { + + items.append(element) + } + // pop + mutating func pop() -> T? { + + if items.count > 0 { + + return items.removeLast() + } + return nil + } + // peek + func peek() -> T? { + + return items.last + } + // size + func size() -> Int { + + return items.count + } +} -//4) +// this struct helps me (and the computer) conceptualize what the two characteristics are +// that must match up in order for bracket pairs to be considered valid +struct Bracket { + + var orientation: String + var name: String + + init(symbol: String) { + + switch symbol { + case "(": + orientation = "open" + name = "parenthesis" + case ")": + orientation = "close" + name = "parenthesis" + case "[": + orientation = "open" + name = "bracket" + case "]": + orientation = "close" + name = "bracket" + case "{": + orientation = "open" + name = "brace" + case "}": + orientation = "close" + name = "brace" + default: + orientation = "invalid" + name = "invalid" + } + } +} -//5) +func isBalanced(array: [String]) -> Bool { + + // no way there will be matching pairs if the array count is odd. an array of 0 + // brackets is considered balanced in this implementation, though if we wanted to + // we could also trim that out here + if array.count % 2 != 0 { return false } + + var stack = Stack() + + for i in 0.. - + \ No newline at end of file diff --git a/HWFrom1-31-16(Sets and HashMaps).playground/Contents.swift b/HWFrom1-31-16(Sets and HashMaps).playground/Contents.swift index c5841b0..6ff45c8 100644 --- a/HWFrom1-31-16(Sets and HashMaps).playground/Contents.swift +++ b/HWFrom1-31-16(Sets and HashMaps).playground/Contents.swift @@ -1,20 +1,80 @@ +import Foundation + //: https://docs.google.com/document/d/1T7tYRqpDPWoxarfmXqfRCHB-YqvA8-Qx_mEyy5smtfc //1) -//a) +//a) Int + + +/*b) -//b) +struct Point: Hashable { + let x, y: Int +} -//c) +*/ + + +//c) Array //2) +let blacklist: Set = ["crapple", "fandroid", "m$"] + +func moderate(message: String) -> Bool { + let words = message.componentsSeparatedByString(" ") + for word in words { + if blacklist.contains(word.lowercaseString) { + return false + } + } + return true +} + +moderate("I would never use a crApple product!") +moderate("something else") + +//3) + +protocol PhoneBookProtocol { + mutating func addPerson(name: String, phoneNumber: String) + mutating func removePerson(name: String) + mutating func importFrom(oldPhonebook: [(String, String)]) + func findPerson(name: String) -> String? // Return phone # +} + +class PhoneBook: PhoneBookProtocol { + var storage: [String : String] = [:] // @{} + //var storage = Dictionary() + + func addPerson(name: String, phoneNumber: String) { + storage[name] = phoneNumber + } + + func removePerson(name: String) { + storage.removeValueForKey(name) + } + + func findPerson(name: String) -> String? { + return storage[name] + } + + func importFrom(oldPhonebook: [(String, String)]) { + for entry in oldPhonebook { + addPerson(entry.0, phoneNumber: entry.1) + } + } +} + +let oldData = [("Caleb", "501-555-1234"), ("Mike", "212-555-4321"), ("Jenny", "345-867-5309")] +let phoneBook = PhoneBook() +phoneBook.importFrom(oldData) -//3) \ No newline at end of file +phoneBook.findPerson("Jenny") \ No newline at end of file diff --git a/HWFrom1-31-16(Sets and HashMaps).playground/contents.xcplayground b/HWFrom1-31-16(Sets and HashMaps).playground/contents.xcplayground index 5da2641..9f5f2f4 100644 --- a/HWFrom1-31-16(Sets and HashMaps).playground/contents.xcplayground +++ b/HWFrom1-31-16(Sets and HashMaps).playground/contents.xcplayground @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/HWfrom1-09-16(SwiftIntro).playground/Contents.swift b/HWfrom1-09-16(SwiftIntro).playground/Contents.swift old mode 100644 new mode 100755 index 488e9ed..bb4d666 --- a/HWfrom1-09-16(SwiftIntro).playground/Contents.swift +++ b/HWfrom1-09-16(SwiftIntro).playground/Contents.swift @@ -1,23 +1,59 @@ //: Playground - noun: a place where people can play -import UIKit -var str = "Hello, playground" +/* 1) Given an integer N, there is a list of size N-1 that is missing one number from 1 - N(inclusive). Find that number. */ -/* +func findMissingNumber(numbers: [Int]) -> Int { + + let complete = Set(Range(start: 1, end: numbers.count + 1 + 1)) + let incomplete = Set(numbers) + + return Array(complete.subtract(incomplete))[0] +} -Use the link here to get the questions. Then code your solutions below. If it does not require code, just write your answer in comments. +print(findMissingNumber([2, 1, 3, 4, 6, 9, 10, 7, 8])) +print(findMissingNumber([1, 8, 7, 5, 2, 9, 3, 6, 4])) -https://docs.google.com/document/d/1DQ2aCJ_yUZtazzCfb0PaS81bg61V2ZOSxpABh981xSo/edit +/* 2) Given a list of size N containing numbers 1 - N (inclusive). return true if there are duplicates, false if not */ -1) +func doesHaveRepeatingInts(numbers: [Int]) -> Bool { + + return numbers.count > Set(numbers).count +} -2) +print(doesHaveRepeatingInts([2, 2, 3, 4])) +print(doesHaveRepeatingInts([1, 3, 5, 6])) -3) -4) +/* 3) Given two lists, find the smallest value that exists in both lists. +L1 = [1,2,5,9] +L2 = [9, 20 , 5] */ +func smallestValueInCommon(numbers1: [Int], numbers2: [Int]) -> Int? { + + return Set(numbers1).intersect(Set(numbers2)).minElement() +} + +print(smallestValueInCommon([2, 3, 4, 5], numbers2: [0, 7, 8, 9])) +print(smallestValueInCommon([2, 3, 4, 5], numbers2: [3, 7, 2, 9])) + + +/* 4) Check to see if an integer is a palindrome don’t use casting */ + +func isPalindromeInt(var num:Int) -> Bool { + + var asArray = [Int]() + + while num > 0 { + + asArray.insert(num % 10, atIndex: 0) + num = num / 10 + } + + return asArray == asArray.reverse() +} + +print(isPalindromeInt(165283)) +print(isPalindromeInt(165561)) -*/ diff --git a/HWfrom1-09-16(SwiftIntro).playground/contents.xcplayground b/HWfrom1-09-16(SwiftIntro).playground/contents.xcplayground old mode 100644 new mode 100755 diff --git a/HWfrom1-09-16(SwiftIntro).playground/playground.xcworkspace/contents.xcworkspacedata b/HWfrom1-09-16(SwiftIntro).playground/playground.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/HWfrom1-09-16(SwiftIntro).playground/timeline.xctimeline b/HWfrom1-09-16(SwiftIntro).playground/timeline.xctimeline old mode 100644 new mode 100755 diff --git a/HWfrom1-10-016(BigO).playground/Contents.swift b/HWfrom1-10-016(BigO).playground/Contents.swift old mode 100644 new mode 100755 index 2040d38..823e226 --- a/HWfrom1-10-016(BigO).playground/Contents.swift +++ b/HWfrom1-10-016(BigO).playground/Contents.swift @@ -6,25 +6,152 @@ var str = "Hello, playground" /* -Use the link here to get the questions. Then code your solutions below. If it does not require code, just write your answer in comments. +1) With my new top of the line XJ452 supercomputer, memory access takes 1 picosecond, math operations take 3 picoseconds, and storing data in memory takes 10 picoseconds. My friend wrote a filter that makes a pixel more awesome, and takes 200 picoseconds to run. -https://docs.google.com/document/d/1aF1imJUVahCSJAuN1OEm5lQXwpSFaAmVmAETKMM6PLQ/edit#heading=h.za36ai6n5fth + a) How long would my computer take to execute the following code if the input image is 1000px wide by 2000px tall? What if it’s n by m? -1) -2) + Pixel **awesomeFilter(Pixel image[][], int width, int height) { -3) + 14 * width + for (int i = 0; i < width; i++) { -4) -5) + for (int j = 0; j < height; j++) { -6) -7) + [image[i][j] makeMoreAwesome]; + } + } + return image; + } + + + ANSWER: assuming that calling each pixel takes 2 picoseconds of memory access and not counting the cost of + passing in the parameters to the awesomeFilter function or the return statement (because I'm not sure how to + calculate that), it comes out to 442,029,010 picoseconds. If the number of pixels is n by m, assuming the same + methodology, the formula (in picoseconds) is: + + 229mn + 19n + 10 + + O(mn) + + + + + b) What is the time complexity of this method, expressed in big O notation? Assume the image is square, and both dimensions are ‘n’. + + ANSWER: O(n^2) + + + + + c) My friend sends me an improved version of his algorithm, makeEvenMoreAwesome, that takes into account the pixels around the image. He says it’s O(n2) in the amount of pixels in the image. What is the new time complexity of the method? + + ANSWER: O(n^4) + + +****************************************************************************************************************************** + +2) If foo(xs) is a function with time complexity n (where n is the size of the input array), and bar(xs) is a function with time complexity n2, what is the time complexity of each of the following snippets of code or algorithms? + + a) + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + foo(xs); + } + } // n^3 + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + bar(xs); + } + } // n^4 + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + // do cool stuff + } + } // n^2 + + ANSWER: O(n^4) + + + b) + int frobnicate(ys, m) { + if (m == 0) { + return 0; + } + return ys[m] + frobnicate(ys, m - 1); + } + frobnicate(xs, n); + + Tip: Write down a table with n from 0 to 5 and trace through to find out how many times frobnicate is called with each value of n. + + ANSWER: O(n) + + + c) An algorithm that takes as its input a list of friends of length n, filters out duplicates using a method similar to our hasDuplicates method, sorts the list using merge sort (see bigocheatsheet.com), then prints each item to the screen. + + ANSWER: O(n^2) + O(n log(n)) + O(n) = O(n^2) + + + d) An algorithm that searches the now-sorted list of friends for a specific friend (not including the time it takes to sort). + + ANSWER: Using binary search, O(log(n)) + + +***************************************************************************************************************************** + + 3) Look at the complexities for some common data structures at bigocheatsheet.com. Pick a good data structure for each of the following scenarios (there are sometimes multiple answers): + + + a) You get a large dataset of points of interest from an API when your app first runs. You build it once at the beginning, and then have to search it many times while the user pans around a map. + + ANSWER: binary search tree + + + b) You get a small dataset of points of interest from an API every time the user pans the map. You construct the data set many times and only render it once, then you discard it and do another API search. + + Tip: Constructing a dataset of size n means you have to call the data structure’s insert method n times. So if the data structure has an insert method that takes O(n2), the time to build it all from scratch is O(n3). + + ANSWER: array + + + c) You used a linked list for your music app’s playlist feature, but now when people search their playlist, there’s a noticeable lag before loading results. Your competitor’s app is buttery smooth when searching, even showing results as you type. What data structure would allow you to more quickly search without compromising too much on the speed of inserting and deleting tracks, even in the worst case? + + ANSWER: TREE + + +****************************************************************************************************************************** + + 4) Write an algorithm using one of the methods from exercise 1 (your choice) to calculate the factorial of a number n. What is the time complexity of your method in terms of the input value? + + ANSWER: O(n) + + +****************************************************************************************************************************** + + 5) Write an Objective C or Swift function to multiply two numbers without using the * operator. Use the grade school method of multiplying by doing repeated addition. For instance, 5 * 8 = 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 = 40. Find the big O of your function in terms of n and m (the two operands). + + ANSWER: O(m) + + +****************************************************************************************************************************** + + 6) Look up Russian Peasant Multiplication. It’s a faster way to multiply numbers, especially on a binary computer (like yours!). Implement a new multiplication function using this technique and find the big O of your method. If you have trouble with implementing this, write a flow chart and find the big O based on that. (But it’s more satisfying to implement it and run it) + + Tip: Run through the method by hand a few times to see how it works and verify to yourself that it does. It’s a non-intuitive algorithm. This will hopefully also make the time complexity more clear. + + ANSWER: O(log(n)) [every time you divide by two each pass it's a hint of O(log(n)) + + +***************************************************************************************************************************** + + 7) Using the technique from exercise 4, profile the built in sorting method in objective C (use an NSMutableArray and google how to sort an array of numbers in objective C). Graph the result. Use spreadsheet formulas to add graph lines for n, n2, and n*log(n). (You’ll have to modify the factors to make them fit in the graph window and to be close to the graph of method execution time). Show that the sort method best fits n * log(n). + + ANSWER: ?? + */ diff --git a/HWfrom1-10-016(BigO).playground/contents.xcplayground b/HWfrom1-10-016(BigO).playground/contents.xcplayground old mode 100644 new mode 100755 index 5da2641..9f5f2f4 --- a/HWfrom1-10-016(BigO).playground/contents.xcplayground +++ b/HWfrom1-10-016(BigO).playground/contents.xcplayground @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/HWfrom1-10-016(BigO).playground/playground.xcworkspace/contents.xcworkspacedata b/HWfrom1-10-016(BigO).playground/playground.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/HWfrom1-10-016(BigO).playground/timeline.xctimeline b/HWfrom1-10-016(BigO).playground/timeline.xctimeline old mode 100644 new mode 100755 diff --git a/HWfrom1-14-16(Logic+Discrete_Math).playground/Contents.swift b/HWfrom1-14-16(Logic+Discrete_Math).playground/Contents.swift old mode 100644 new mode 100755 index bc0df91..b6a178f --- a/HWfrom1-14-16(Logic+Discrete_Math).playground/Contents.swift +++ b/HWfrom1-14-16(Logic+Discrete_Math).playground/Contents.swift @@ -4,26 +4,77 @@ import UIKit var str = "Hello, playground" - /* - Question 1: https://www.hackerrank.com/challenges/minimum-draws -Copy and paste your code: +Copy and paste your code: */ + +let testCases = Int(readLine(stripNewline: true)!)! -What is the big O runtime of your code?: +for _ in 0.. - + \ No newline at end of file diff --git a/HWfrom1-14-16(Logic+Discrete_Math).playground/playground.xcworkspace/contents.xcworkspacedata b/HWfrom1-14-16(Logic+Discrete_Math).playground/playground.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/HWfrom1-14-16(Logic+Discrete_Math).playground/timeline.xctimeline b/HWfrom1-14-16(Logic+Discrete_Math).playground/timeline.xctimeline old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755