The value in understanding algorithms from a theoretical perspective

academics algorithms computer science
By Will O.

Computer science majors across many universities often dread their introduction to algorithms course, especially if it is proof-based. It can feel out of place compared to the rest of their classes that focus more on learning standard coding practices, the fundamentals of how computers work, or just generally courses that seem to directly prepare students for becoming software engineers. What’s the purpose of a proof-based algorithms course that feels more like a math than computer science class? 

Easy Answer: Preparation for Technicals Interviews

Most tech companies will require a technical interview before they hire you for either a full-time position or an internship. The usual structure to these interview questions is that the candidate is given a moderately challenging algorithm question, which they take some time to try to solve theoretically. The candidate then explains their solution to the interviewer before actually implementing it in code. 

It’s easy to guess that a mathematical understanding of algorithmic principles would be helpful for this, but I’ve also seen evidence of this demonstrated countless times. For example, when I was a freshman at Caltech, the only two freshmen in my class who received internship offers from Google were both dual math and computer science majors who had already taken a theoretical CS course. They were well prepared for recognizing which algorithmic approach, such as dynamic programming, greedy, divide and conquer, etc. was best for the interview questions and could explain why it works, reason about runtime, and understood the algorithm deeply enough to implement it correctly.

Deeper Answer: Solidifying Fundamentals 

It is quite possible to be a good programmer without being able to prove why an algorithm is correct, but anyone looking to truly be a master in the field should surely be able to understand and argue about the correctness of any algorithm they use. When you just take for granted the algorithms and packages of other engineers, you aren’t really in control of your code. 

Writing proofs is like shooting free throws, perfecting brush strokes, or practicing chords. It solidifies your fundamentals. A lot can change from one programming language to another, but the underlying structure and correctness of an algorithm does not. Thus a theoretical understanding of algorithmic principles gives you the necessary skills to be creative in your code and not just rely on what exists from others. Although it may be a challenging course, you should appreciate a proof-based algorithms course for teaching you the fundamentals and deepening your understanding of computer science as a whole.

Comments

topicTopics
academics study skills MCAT medical school admissions SAT expository writing college admissions English GRE MD/PhD admissions GMAT LSAT chemistry strategy math writing physics ACT biology language learning graduate admissions law school admissions test anxiety MBA admissions homework help creative writing interview prep AP exams MD study schedules summer activities history academic advice career advice philosophy premed personal statements secondary applications computer science organic chemistry ESL PSAT economics grammar admissions coaching law statistics & probability psychology SSAT covid-19 legal studies 1L CARS logic games Spanish USMLE calculus dental admissions parents reading comprehension research Latin engineering verbal reasoning Common Application DAT excel political science French Linguistics Tutoring Approaches chinese mathematics DO MBA coursework Social Advocacy academic integrity case coaching classics diversity statement genetics geometry kinematics medical school skills supplements IB exams ISEE MD/PhD programs PhD admissions algebra athletics biochemistry business business skills careers data science letters of recommendation mental health mentorship social sciences software engineering test prep trigonometry work and activities 2L 3L Academic Interest Anki EMT English literature FlexMed Fourier Series Greek Italian Pythagorean Theorem STEM Sentence Correction Zoom algorithms amino acids analysis essay architecture art history artificial intelligence astrophysics cantonese capital markets cell biology central limit theorem chemical engineering chromatography climate change clinical experience cold emails constitutional law curriculum dental school distance learning enrichment european history finance first generation student fun facts functions gap year harmonics health policy history of medicine history of science information sessions institutional actions integrated reasoning intern international students internships investing investment banking logic mandarin chinese mba meiosis mitosis music music theory neurology operating systems phrase structure rules plagiarism poetry pre-dental presentations proofs pseudocode quantitative reasoning school selection simple linear regression sociology software study abroad teaching tech industry transfer typology units virtual interviews writing circles