Algorithms

Posted by Gina on March 25, 2019

Now that I have graduated Flatiron School it is time to prepare for the job market. Data Science is an important part of Code Challenges and I am excited to be learning about it. Here is a great YouTube channel that I have been watching to help get introduced to this completely different topic.

[https://www.youtube.com/channel/UClEEsT7DkdVO_fkrBw0OTrA]

Algorithms are programming tools that make coding easier for us. A method such as sort is absolutely necessary in the coding world - without sorting, there is no structure. To write such a method it is important to not only make it work and make it right, but also have it work fast even when it is used for a high volume. Here is where Big O comes to play. It is important to always assume the worst case scenario so you can realize how long an algorithm might run given an input n. Recursion is very important (repeating the function over and over until the input length is 0 or a wanted output has been achieved) in making functions faster. This is a linear search. If the input - let’s use an array for this example - is sorted there is an even faster way to run the algorithm called binary search. When you know what you are searching for you look where you think it is closest to. That is basically what binary search is. If you have an array you start in the middle. If what you are looking for is not exactly in the middle you can deduct by what is in the middle if its earlier or later in the array. That is the magic of order.

I personally am trying to do as many code challenges as possible to familiarize myself with algorithms and making them as fast as possible. So far I have mainly focused on making my code work and then making it more functional and as DRY as possible. Making it fast has not been my main focus or to be honest in my focus at all during my time at Flatiron so this is an entirely new way of thinking. I am excited to dive into it further!