1 00:00:00,000 --> 00:00:03,975 We've arrived at what I think is a good spot to take a long break and 2 00:00:03,975 --> 00:00:06,307 let all of these new concepts sink in. 3 00:00:06,307 --> 00:00:08,532 But before you go off to the next course, 4 00:00:08,532 --> 00:00:12,344 let's take a few minutes to recap everything we've learned so far. 5 00:00:12,344 --> 00:00:16,330 While we did implement two algorithms in this course in actual code, much of 6 00:00:16,330 --> 00:00:20,131 what we learned here was conceptual and will serve as building blocks for 7 00:00:20,131 --> 00:00:22,706 everything we're going to learn in the future. 8 00:00:22,706 --> 00:00:24,782 So let's list all of it out. 9 00:00:24,782 --> 00:00:28,648 The first thing we learned about, and arguably the most important, 10 00:00:28,648 --> 00:00:30,257 was algorithmic thinking. 11 00:00:30,257 --> 00:00:35,197 Algorithmic thinking is an approach to problem solving that involves breaking 12 00:00:35,197 --> 00:00:39,988 a problem down into a clearly defined input and output, along with a distinct 13 00:00:39,988 --> 00:00:44,140 set of steps that solves the problem by going from input to output. 14 00:00:44,140 --> 00:00:48,474 Algorithmic thinking is not something you develop overnight by taking one course. 15 00:00:48,474 --> 00:00:50,583 So don't worry if you're thinking, well, 16 00:00:50,583 --> 00:00:53,309 I still don't truly know how to apply what I learned here. 17 00:00:53,309 --> 00:00:57,370 Algorithmic thinking sinks in after you go through several examples in 18 00:00:57,370 --> 00:00:59,612 a similar fashion to what we did today. 19 00:00:59,612 --> 00:01:04,050 It also helps to apply these concepts in the context of a real example, 20 00:01:04,050 --> 00:01:07,828 which is another thing we will strive to do moving forward. 21 00:01:07,828 --> 00:01:12,016 Regardless, it is important to keep in mind that the main goal here is not to 22 00:01:12,016 --> 00:01:14,873 learn how to implement a specific data structure or 23 00:01:14,873 --> 00:01:16,879 algorithm off the top of your head. 24 00:01:16,879 --> 00:01:19,993 I'll be honest, I had to look up a couple of code snippets for 25 00:01:19,993 --> 00:01:22,814 a few of the algorithms myself in writing this course. 26 00:01:22,814 --> 00:01:27,092 But in going through this, you now know that binary search exists and 27 00:01:27,092 --> 00:01:31,240 can it apply to a problem where you need a faster search algorithm. 28 00:01:31,240 --> 00:01:35,630 Unlike most courses where you can immediately apply what you have learned to 29 00:01:35,630 --> 00:01:38,787 build something cool, learning about algorithms and 30 00:01:38,787 --> 00:01:41,683 data structures will pay off more in the long run. 31 00:01:41,683 --> 00:01:46,340 The second thing we learned about is how to define and implement algorithms. 32 00:01:46,340 --> 00:01:49,160 We've gone over these guidelines several times, so 33 00:01:49,160 --> 00:01:51,236 I won't bore you here again at the end. 34 00:01:51,236 --> 00:01:55,896 But I will remind you that if you're often confused about how to effectively break 35 00:01:55,896 --> 00:01:58,935 down a problem in code to something more manageable, 36 00:01:58,935 --> 00:02:02,600 following those algorithm guidelines is a good place to start. 37 00:02:02,600 --> 00:02:07,308 Next, we learned about big O and measuring the time complexity of algorithms. 38 00:02:07,308 --> 00:02:12,271 This a mildly complicated topic, but once you've abstracted the math away, 39 00:02:12,271 --> 00:02:14,611 it isn’t as hazy a topic as it seems. 40 00:02:14,611 --> 00:02:18,148 Now don't get me wrong, the math is pretty important, but only for 41 00:02:18,148 --> 00:02:20,518 those designing and analyzing algorithms. 42 00:02:20,518 --> 00:02:25,006 Our goal is more about how to understand and evaluate algorithms. 43 00:02:25,006 --> 00:02:28,492 We learned about common runtimes like constant, 44 00:02:28,492 --> 00:02:31,904 linear, logarithmic and quadratic runtimes. 45 00:02:31,904 --> 00:02:34,002 These are all fairly new concepts. 46 00:02:34,002 --> 00:02:37,155 But in time, you will immediately be able to distinguish 47 00:02:37,155 --> 00:02:40,307 the runtime of an algorithm based on the code you write and 48 00:02:40,307 --> 00:02:43,803 have an understanding of where it sits on an efficiency scale. 49 00:02:43,803 --> 00:02:48,424 You will also, in due time, internalize runtimes of popular algorithms, 50 00:02:48,424 --> 00:02:53,202 like the fact that binary search runs in logarithmic time and constant space. 51 00:02:53,202 --> 00:02:57,828 And be able to recommend alternative algorithms for a given problem. 52 00:02:57,828 --> 00:03:02,622 All in all, over time, the number of tools in your tool belt will increase. 53 00:03:02,622 --> 00:03:06,247 Now next, we learned about two important search algorithms and 54 00:03:06,247 --> 00:03:09,277 the situations in which we select one over the other. 55 00:03:09,277 --> 00:03:12,282 We also implemented these algorithms in code so 56 00:03:12,282 --> 00:03:14,692 that you got a chance to see them work. 57 00:03:14,692 --> 00:03:18,742 We did this in python, but if you are more familiar with a different language and 58 00:03:18,742 --> 00:03:22,612 haven't gotten the chance to check out the code snippets we've provided, 59 00:03:22,612 --> 00:03:25,409 you should try your hand at implementing it yourself. 60 00:03:25,409 --> 00:03:27,619 It's a really good exercise to go through. 61 00:03:27,619 --> 00:03:31,067 Finally, we learned about an important concept and 62 00:03:31,067 --> 00:03:34,680 a way of writing algorithmic code through recursion. 63 00:03:34,680 --> 00:03:39,073 Recursion is a tricky thing, and depending on the language you write code with, 64 00:03:39,073 --> 00:03:41,087 you may run into it more than others. 65 00:03:41,087 --> 00:03:46,117 It is also good to be aware of, because as we saw in our implementation of binary 66 00:03:46,117 --> 00:03:51,319 search, whether recursion was used or not affected the amount of space we used. 67 00:03:51,319 --> 00:03:55,529 Don't worry if you don't fully understand how to write recursive functions. 68 00:03:55,529 --> 00:03:57,435 I don't truly know either. 69 00:03:57,435 --> 00:04:00,300 The good part is you can always look these things up and 70 00:04:00,300 --> 00:04:02,217 understand how other people do it. 71 00:04:02,217 --> 00:04:06,292 Any time you encounter recursion in our courses moving forward, 72 00:04:06,292 --> 00:04:11,566 you'll get a full explanation of how and why the function is doing what it's doing. 73 00:04:11,566 --> 00:04:14,076 And that brings us to the end of this course. 74 00:04:14,076 --> 00:04:18,182 I'll stress again that the goal of this course was to get you prepared for 75 00:04:18,182 --> 00:04:22,896 learning about more specific algorithms by introducing you to some of the tools and 76 00:04:22,896 --> 00:04:25,213 concepts you will need moving forward. 77 00:04:25,213 --> 00:04:27,791 So if you're sitting there thinking, I still don't 78 00:04:27,791 --> 00:04:31,931 know how to write many algorithms or how to use algorithmic thinking, that's okay. 79 00:04:31,931 --> 00:04:32,787 We'll get there. 80 00:04:32,787 --> 00:04:34,137 Just stick with it. 81 00:04:34,137 --> 00:04:37,097 As always, have fun and happy coding.