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.

Will is now attending Stanford’s Graduate School of Business for his PhD, studying applications of machine learning, algorithms, and network science to problems in business. He previously double majored in computer science and mathematics at Caltech.

Comments

topicTopics
academics study skills medical school admissions MCAT SAT college admissions expository writing strategy English MD/PhD admissions writing LSAT physics GMAT GRE chemistry academic advice biology graduate admissions math law school admissions ACT interview prep language learning test anxiety personal statements premed career advice MBA admissions AP exams homework help test prep creative writing MD computer science mathematics study schedules Common Application summer activities history secondary applications philosophy research organic chemistry economics supplements 1L grammar statistics & probability PSAT admissions coaching dental admissions psychology law legal studies ESL reading comprehension CARS PhD admissions SSAT covid-19 logic games calculus engineering USMLE medical school mentorship Latin Spanish parents AMCAS admissions advice biochemistry case coaching verbal reasoning DAT English literature STEM excel genetics political science skills French Linguistics MBA coursework Tutoring Approaches academic integrity astrophysics chinese classics dental school gap year letters of recommendation mechanical engineering technical interviews units Anki DO Social Advocacy algebra art history artificial intelligence business careers cell biology data science diversity statement first generation student freewriting geometry graphing kinematics linear algebra mental health presentations quantitative reasoning software engineering study abroad tech industry time management work and activities 2L AAMC DMD IB exams ISEE MD/PhD programs MMI Sentence Correction adjusting to college algorithms amino acids analysis essay argumentative writing athletics business skills cold emails executive function fellowships finance functions genomics information sessions international students internships logic networking office hours poetry pre-dental proofs resume revising scholarships science social sciences trigonometry writer's block 3L Academic Interest EMT FlexMed Fourier Series Greek Health Professional Shortage Area Italian JD/MBA admissions Japanese Lagrange multipliers London MD vs PhD Montessori National Health Service Corps Pythagorean Theorem Python Shakespeare Step 2 TMDSAS Taylor Series Truss Analysis Zoom acids and bases active learning architecture art art and design schools art portfolios bacteriology bibliographies biomedicine brain teaser burnout campus visits cantonese capacitors capital markets central limit theorem centrifugal force chem/phys chemical engineering chess chromatography class participation climate change clinical experience community service constitutional law consulting cover letters curriculum dementia demonstrated interest dimensional analysis distance learning econometrics electric engineering electricity and magnetism embryology entropy escape velocity evolution extracurriculars fundraising harmonics health policy history of medicine history of science hybrid vehicles hydrophobic effect ideal gas law immunology induction infinite institutional actions integrated reasoning intermolecular forces intern investing investment banking lab reports letter of continued interest linear maps mandarin chinese