diff --git a/data-structures-&-algorithms/big-o/README.md b/data-structures-&-algorithms/big-o/README.md index 66c3f407..bc884626 100644 --- a/data-structures-&-algorithms/big-o/README.md +++ b/data-structures-&-algorithms/big-o/README.md @@ -181,7 +181,6 @@ const myAutomaticGuesser = (number, tooLow) => { } }; - game(); ``` @@ -189,6 +188,17 @@ How close is this solution to the one you used when trying it yourself? If it ma If it isn't how you approached it, try to code your approach -## Lab: Accumulate Points on Codewars +## Lab: + +### Part 1 + +- What is the time complexity for the previous problems we've solved in class? +- Print primes? +- Find the median? +- Disemvowel trolls? +- Your own Index Of function +- Count words? + +### Part 2 Accumulate Points on Codewars Take some time to go back and solve any problems you got stuck on diff --git a/data-structures-&-algorithms/fibonacci-and-recursion/README.md b/data-structures-&-algorithms/fibonacci-and-recursion/README.md index 04dc4bd3..84af91f5 100644 --- a/data-structures-&-algorithms/fibonacci-and-recursion/README.md +++ b/data-structures-&-algorithms/fibonacci-and-recursion/README.md @@ -28,3 +28,10 @@ Write a function that prints numbers in the Fibonacci sequence up to a give limi ### Tribonacci Sequence - [Tribonacci Sequence on Code Wars](https://www.codewars.com/kata/556deca17c58da83c00002db) + +## Lab: Accumulate Points on Codewars + +- [Be Concise](https://www.codewars.com/kata/5703c093022cd1aae90012c9) +- [Recursion Factorial](https://www.codewars.com/kata/5694cb0ec554589633000036) +- [Sum of a Sequence](https://www.codewars.com/kata/586f6741c66d18c22800010a) +- [Reverser](https://www.codewars.com/kata/58069e4cf3c13ef3a6000168) diff --git a/data-structures-&-algorithms/fibonacci-and-recursion/lesson-notes/README.md b/data-structures-&-algorithms/fibonacci-and-recursion/lesson-notes/README.md index 39948dc5..ff7f4b71 100644 --- a/data-structures-&-algorithms/fibonacci-and-recursion/lesson-notes/README.md +++ b/data-structures-&-algorithms/fibonacci-and-recursion/lesson-notes/README.md @@ -39,7 +39,7 @@ Average humans, do not add all the numbers all at once. We add two numbers toget 21 + 7 = 28 28 + 8 = 36 36 + 9 = 45 -45 + 10 = 55 +45 + 10 = 55 55 + no numbers left means our answer is 55 ``` @@ -86,7 +86,7 @@ Short circuiting: Default argument: -- `const sumNumbers = (numsArr, sum = 0)` This will set teh value of sum to 0, if sum is undefined +- `const sumNumbers = (numsArr, sum = 0)` This will set the value of sum to 0, if sum is undefined Default argument is a newer syntax. Let's try it. The first time we call `sumNumbers`, we are only passing one argument, so the sum will be set to the default value of 0 @@ -103,7 +103,7 @@ console.log(sumNumbers(numsToSum)); 5. Now we have to define a way (or rules) to decrease our complex problem (adding 10 numbers), down to the base case, having no more numbers to add. -Each time we add a number, we have to remove it from teh array, thus decreasing the array length and bringing us closer to the base case. We'll use `.shift()` to take off the number at the start of the array. +Each time we add a number, we have to remove it from the array, thus decreasing the array length and bringing us closer to the base case. We'll use `.shift()` to take off the number at the start of the array. Thought question: could we use `.pop()` instead? diff --git a/data-structures-&-algorithms/intro-to-problem-solving/README.md b/data-structures-&-algorithms/intro-to-problem-solving/README.md index 21dde2e5..144268c3 100644 --- a/data-structures-&-algorithms/intro-to-problem-solving/README.md +++ b/data-structures-&-algorithms/intro-to-problem-solving/README.md @@ -134,3 +134,16 @@ You have - Discuss past interviews (from any field of work you have done) - Bring up what makes you most anxious - How can you work on making yourself a stronger candidate? + +## Homework + +Watch: + +[The Secret Rules of Modern Living Algorithms](https://www.youtube.com/watch?v=kiFfp-HAu64) + +And answer the following questions on Canvas: + +- Describe the algorithm to win the chocolate, and not the chili +- Name 2 types of sorting algorithms discussed in the video +- Name the algorithm used to help find matches for people who needed a kidney +- What animal deals with the Traveling Salesman problem in its daily life? diff --git a/data-structures-&-algorithms/oop-continued/README.md b/data-structures-&-algorithms/oop-continued/README.md index 6d3bf4ca..62acf0e0 100644 --- a/data-structures-&-algorithms/oop-continued/README.md +++ b/data-structures-&-algorithms/oop-continued/README.md @@ -2,9 +2,7 @@ ### Setting intent -> Quote - -Details +> As a class, determine the intent for the day ## Trivia Questions @@ -38,3 +36,7 @@ Write down any questions you have about this model, what information is needed? ## Bonus - Make a simple BlackJack game to be played in the console + +## Lab: Accumulate Points on Codewars + +- [Build a Car](https://www.codewars.com/kata/5832d6e2565e120ae60000bb) diff --git a/data-structures-&-algorithms/oop-continued/lesson-notes/README.md b/data-structures-&-algorithms/oop-continued/lesson-notes/README.md index 25d2745c..543c8abf 100644 --- a/data-structures-&-algorithms/oop-continued/lesson-notes/README.md +++ b/data-structures-&-algorithms/oop-continued/lesson-notes/README.md @@ -9,6 +9,8 @@ ## Inheritance +Note: we are building on top of our code we wrote yesterday. + In our world of animals, let's say there is a new kind: Mythical creature. The mythical creature will have all the properties of methods as an animal and some additional ones. We could copy our `Animal` class and paste it and add more, but what if we need to change the `greet` function? Then we would have to find every place we copy/pasted and carefully update. We are going to keep our animal as our one source of truth as a parent class. Original Animal: diff --git a/data-structures-&-algorithms/oop-intro/README.md b/data-structures-&-algorithms/oop-intro/README.md index 61600339..03276a73 100644 --- a/data-structures-&-algorithms/oop-intro/README.md +++ b/data-structures-&-algorithms/oop-intro/README.md @@ -33,7 +33,7 @@ const delete = (item) => { The goal will be to play a simple game of Blackjack (two players, each get two cards, determine who wins) -**Note**: We will work on solving this after the second lesson on OOP and you will get more time to work on this problem during the next session +**Note**: We will continue to work on solving this after the second lesson on OOP and you will get more time to work on this problem during the next session - Cards with a face of 2 - 10, jack, queen, king ace - Values of cards 2-10 are same as face, jack, queen, and king are worth 10, ace starts as a value of 11, but can be changed to a value of 1 @@ -54,4 +54,9 @@ Both of these are from the book Cracking the Code Interview. Work with a partner - Model a Jukebox - Model a Call Center -### Extra Problem Title +## Lab: Accumulate Points on Codewars + +- [Object Oriented Piracy](https://www.codewars.com/kata/54fe05c4762e2e3047000add) +- [Classy Classes](https://www.codewars.com/kata/55a144eff5124e546400005a) +- [Regular Ball Super Ball](https://www.codewars.com/kata/53f0f358b9cb376eca001079) +- [Color Ghost](https://www.codewars.com/kata/53f1015fa9fe02cbda00111a) diff --git a/data-structures-&-algorithms/oop-intro/lesson-notes/README.md b/data-structures-&-algorithms/oop-intro/lesson-notes/README.md index 54787e28..199f40ec 100644 --- a/data-structures-&-algorithms/oop-intro/lesson-notes/README.md +++ b/data-structures-&-algorithms/oop-intro/lesson-notes/README.md @@ -397,3 +397,17 @@ console.log(StringExtra.reverse("I palindrome I")); console.log(StringExtra.description); ``` + +### Extreme Super Bonus + +Read this code, analyze what it does then research what is `prototype` in JavaScript, how it works and what does it do? + +How does it relate to this lesson on classes? + +```js +String.prototype.reverse = function () { + return this.split("").reverse().join(""); +}; + +console.log("foMO".reverse()); +```