Instructor: Jared Warren
Date: 2020-03-26
What is the difference between Atomic and Non-Atomic? Copy, Nonatomic etc.. readonly, atomic, readwrite,
Best resource: https://academy.realm.io/posts/tmi-objective-c-property-attributes/
| /*: | |
| # Tuesday Stretch Problem 6.2 | |
| ## Add Ints | |
| ### Instructions: | |
| Create a func called add where the method allows one to pass as many or as few Ints as desired and then adds them together and returns the result. | |
| Example: If I call add(3, 7), it prints out 10. Example: If I call add(3, 7, 2, 4), it prints out 16. Example: If I call add(3, 7, 2, 9, 12, 11), it prints out 44. | |
| */ |
| /*: | |
| # Monday Stretch Problem 6.1 | |
| ## Game of Threes | |
| ### Instructions: | |
| 1. Make a method that takes an Int and returns an array of steps to get to 1. | |
| 2. The game goes as follows: Start with the given Int and, if it is divisible by 3, divide it by 3, otherwise ADD OR SUBTRACT 1 (whichever makes the number divisible by 3, then divide it. | |
| 3. Repeat step 2, until you reach 1. | |
| Example: Input: 100 Output: [100, 33, 11, 4, 1] |
| /*: | |
| # Wednesday Stretch Problem 5.3 | |
| ## Palindrome | |
| ### Instructions | |
| - Make a function that takes in a string and returns if it is a palindrome (true/false). | |
| ``` | |
| palindrome("thanks") -> false | |
| palindrome("rAcecar") -> true | |
| ``` | |
| - Then ignore spaces. |
| /*: | |
| # Tuesday Stretch Problem 5.2 | |
| ## Longest Word In String | |
| ### Instructions | |
| - Write a function that takes a string and returns the biggest word in that string. | |
| - Make sure to remove punctuation and whitespace. | |
| ``` | |
| longestWord("This string, has a gigantic! word in it...") // returns "gigantic" | |
| longestWord("one, two, three") // returns "three" |
| //: [Palindrome](@previous) | |
| /*: | |
| # Thursday Stretch Problem 5.4 | |
| ## Greatest Common Divisor | |
| ### Instructions | |
| - Read about recursion. | |
| - Note Google's little joke when you search recursion in Chrome. | |
| - Create a function that returns the greatest common divisor of two numbers using recursion. (function calling itself). | |
| */ |
| //: [Palindrome](@previous) | |
| /*: | |
| # Thursday Stretch Problem 5.4 | |
| ## Greatest Common Divisor | |
| ### Instructions | |
| - Read about recursion. | |
| - Note Google's little joke when you search recursion in Chrome. | |
| - Create a function that returns the greatest common divisor of two numbers using recursion. (function calling itself). | |
| */ |
Instructor: Jared Warren
Date: 2020-03-26
Best resource: https://academy.realm.io/posts/tmi-objective-c-property-attributes/
| // | |
| // main.m | |
| // Stretch Problem 4.4 - FizzBuzz ObjC | |
| // | |
| // Created by theevo on 3/26/20. | |
| // Copyright © 2020 Theo Vora. All rights reserved. | |
| // | |
| /* | |
| Write a method that prints the numbers from 1 to an inputed number. But for multiples of three print "Dev" instead of the number and for the multiples of five print "Mtn". For numbers which are multiples of both three and five print "DevMtn". | |
| */ |
| // | |
| // main.m | |
| // Stretch Problem 4.3 - HighestNumberInArray | |
| // | |
| // Created by theevo on 3/25/20. | |
| // Copyright © 2020 Theo Vora. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |