{"id":937,"date":"2017-04-19T07:27:20","date_gmt":"2017-04-19T05:27:20","guid":{"rendered":"http:\/\/www.sarahmestiri.com\/?p=937"},"modified":"2017-05-10T09:48:57","modified_gmt":"2017-05-10T07:48:57","slug":"is-algorithm-practice-only-for-programming-interviews","status":"publish","type":"post","link":"https:\/\/www.sarahmestiri.com\/index.php\/2017\/04\/19\/is-algorithm-practice-only-for-programming-interviews\/","title":{"rendered":"Is cracking the coding interview the only benefit of learning algorithms?"},"content":{"rendered":"<p>Often, algorithms are considered only when someone is looking for a new job. This tight perception of algorithms use puts us away from what algorithms can allow us to achieve!<\/p>\n<p>Actually, algorithms are everywhere! Algorithms are involved in each aspect of computer science! Not only that but also used in a wide range of fields: recommendations, social media, medicine, psychology, transportation and the list is longer still!<\/p>\n<p>Anything you do, can be broken down into small steps and that, is an Algorithm. Imagine you wake up the morning to go to work and you can\u2019t remember where are your car keys, how would you find them? One approach might be to apply an algorithm, which is a step by step logical procedure. First, you look for places where you used to put it in. You try to remember the last time you used it. You check the place where you went when entering the home. Sooner or later by the flow of steps, you eventually find the car keys. An algorithm is a sequence of instructions which ensure a certain task completion. We, as human, apply algorithms in order to take actions in every aspect of our lives.<\/p>\n<figure id=\"attachment_944\" aria-describedby=\"caption-attachment-944\" style=\"width: 640px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-944 size-large\" src=\"http:\/\/sarahmestiri.com\/wp-content\/uploads\/2017\/04\/smoothie_algorithm-1024x350.png\" alt=\"\" width=\"640\" height=\"219\" \/><figcaption id=\"caption-attachment-944\" class=\"wp-caption-text\">An example of\u00a0how to prepare a Smoothie. It needs an input which is Fluid Frozen fruit Flavorings, and a sequence of ordered steps to be executed to deliver a Smoothie as an output. These are algorithm components. (<a href=\"http:\/\/www.akashiclabs.com\/why-algorithm-transparency-is-vital-to-the-future-of-thinking\/\">original resource of the picture<\/a>)<\/figcaption><\/figure>\n<p>So, algorithm knowledge can be an asset in improving your life or even others\u2019lives! You can turn something that takes the time to decide on it into an algorithm that assists you in the decision process. You can create an algorithm in order to prioritize your tasks, instead of doing it by a simple to-do list. You can make an algorithm in order to predict the best time to visit a city. You can make algorithm in order to get suggestions on what films to watch according to your preferences and historical data. There is no limit to what you imagine and can make real by applying algorithms!<\/p>\n<p>Now, I think it\u2019s time to start talking about how to gain those set of skills in order to make a difference with algorithms! First, let\u2019s go for the characteristics of an algorithm.<\/p>\n<p><strong>What are the characteristics of an algorithm?<\/strong><\/p>\n<ol>\n<li><strong>It should be finite:<\/strong>\u00a0If your algorithm never ends trying to solve the problem it was designed to solve then it is useless<\/li>\n<li><strong>It should have well-defined instructions:\u00a0<\/strong>Each step of the algorithm has to be precisely defined; the instructions should be unambiguously specified for each case.<\/li>\n<li><strong>It should be effective:\u00a0<\/strong>The algorithm should solve the problem it was designed to solve. And it should be possible to demonstrate that the algorithm converges with just a paper and pencil.<\/li>\n<\/ol>\n<p><strong>What are the steps to learn algorithm coding?<\/strong><\/p>\n<ol>\n<li>Develop your programming logic. <a href=\"http:\/\/listamaze.com\/top-10-tips-improve-programming-logic\/\">Here<\/a> some ways to improve it.<\/li>\n<li>Pick up a programming language you are comfortable in (if you don\u2019t have any, I suggest learning python, it\u2019s easy and simple)<\/li>\n<li>Learn Data structures: Start with the basic ones: String, Vectors, Lists, Arrays, Map.\u00a0Then Queue and Stack.\u00a0Finish with Advanced ones: trees, graphs, tries.<\/li>\n<li>Practice coding data structures. <a href=\"http:\/\/www.geeksforgeeks.org\/data-structures\/\">Here is a good link<\/a><\/li>\n<li><a href=\"https:\/\/www.topcoder.com\/community\/data-science\/data-science-tutorials\/\">Learn simple algorithms<\/a> first and then move to the most common algorithms. Make sure you understand every step and don\u2019t be frustrated from being slow. Remember \u00ab\u00a0It does not matter how slowly you go as long as yo don\u2019t stop\u00a0\u00bb. You can look for videos because they make it easier to assimilate.<\/li>\n<li>Start tackling problems (e.g in Hackerrank, there are funny and challenging algorithms). You must have a strategy of resolving problems, I\u2019d suggest following the <a href=\"http:\/\/www.crackingthecodinginterview.com\/uploads\/6\/5\/2\/8\/6528028\/cracking_the_coding_skills_-_v6.pdf\">method proposed by Gayle Laakmann McDowell<\/a>.<\/li>\n<\/ol>\n<p>Finally, through my own modest experience in problem-solving, here are my pieces of advice\u00a0:<\/p>\n<ul>\n<li style=\"text-align: left;\">Ask questions:\u00a0\u00ab\u00a0why\u00a0\u00bb and \u00ab\u00a0what\u00a0\u00bb are really important in order to understand the basics of anything! When you question the choice, you will better memorize the answer and you will dig deeper into the source of the information.<\/li>\n<li style=\"text-align: left;\">To stay motivated and keep the learning curve up, create a simple daily useful algorithm after getting the basics. Accomplishment fuels your energy.<\/li>\n<li>Try to solve the problem manually by yourself first. Take a paper and start writing steps. Especially take your time and don\u2019t move on to the solution fast.<\/li>\n<li>Even if you figure out the solution, don\u2019t tell yourself \u00ab\u00a0It\u2019s ok now, no need to implement it, I know how it works\u00a0\u00bb It\u2019s a big trick there because you never know what you missed if you don\u2019t try it and test it with corner cases.<\/li>\n<li>Be patient. If you begin to feel frustrated about a problem, leave it and go do something that is not so stressful. Then, come back.<\/li>\n<\/ul>\n<p>I hope this helps you to leverage the power of your brain, by discovering its super capabilities to execute algorithms and learning how to translate them into code! \ud83d\ude09<\/p>\n<p>Remember\u00a0how was Rome build (not in a day right)? By each small step in learning algorithms, you are growing your potential to contribute to making life better in this world!<\/p>\n<p><strong>Suggested books:<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/www.amazon.com\/Algorithm-Design-Manual-Steven-Skiena\/dp\/1848000693\">The Algorithm design Manual<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.fr\/Pragmatic-Programmer-Journeyman-Master\/dp\/020161622X\">The pragmatic programmer<\/a><\/li>\n<li><a href=\"http:\/\/www.crackingthecodinginterview.com\/\">Cracking the coding interview<\/a>: programming questions, Java, C\/c++.<\/li>\n<\/ul>\n<p><strong>Github resources:<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/mission-peace\/interview\/wiki\">mission-peace<\/a><\/p>\n<p><strong>Online resources:<\/strong><\/p>\n<p><a href=\"https:\/\/www.topcoder.com\/community\/data-science\/data-science-tutorials\/\">Topcoder<\/a>: an explanation of data structures and algorithms.<\/p>\n<p><a href=\"http:\/\/www.ideserve.co.in\/#learn\">ideserve<\/a>: contains a visual explanation of some algorithm problems<\/p>\n<p><strong>Youtube resources:<\/strong><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/user\/tusharroy2525\">Tushar Roy<\/a>\u00a0: explanation of some advanced algorithms<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Often, algorithms are considered only when someone is looking for a new job. This tight perception of algorithms use puts us away from what algorithms can allow us to achieve! Actually, algorithms are everywhere! Algorithms are involved in each aspect of computer science! Not only that but also used in a wide range of fields: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":941,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","footnotes":""},"categories":[15,24,11,13],"tags":[26,27,25],"class_list":["post-937","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-challenges","category-learning","category-my-activities","category-technology","tag-algorithms","tag-data-structues","tag-learning"],"_links":{"self":[{"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/posts\/937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/comments?post=937"}],"version-history":[{"count":17,"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/posts\/937\/revisions"}],"predecessor-version":[{"id":1004,"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/posts\/937\/revisions\/1004"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/media\/941"}],"wp:attachment":[{"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/media?parent=937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/categories?post=937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sarahmestiri.com\/index.php\/wp-json\/wp\/v2\/tags?post=937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}