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 MCAT medical school admissions SAT college admissions expository writing strategy English MD/PhD admissions writing LSAT physics GMAT GRE chemistry biology math graduate admissions academic advice interview prep law school admissions ACT language learning test anxiety premed career advice MBA admissions personal statements homework help AP exams creative writing MD test prep study schedules computer science Common Application mathematics summer activities history secondary applications philosophy organic chemistry research economics supplements grammar 1L PSAT admissions coaching dental admissions law psychology statistics & probability legal studies ESL CARS PhD admissions SSAT covid-19 logic games reading comprehension calculus engineering USMLE mentorship Latin Spanish parents biochemistry case coaching verbal reasoning AMCAS DAT English literature STEM admissions advice excel medical school political science skills French Linguistics MBA coursework Tutoring Approaches academic integrity astrophysics chinese dental school gap year genetics letters of recommendation mechanical engineering units Anki DO Social Advocacy algebra art history artificial intelligence business careers cell biology classics data science diversity statement geometry kinematics linear algebra mental health presentations quantitative reasoning study abroad tech industry technical interviews time management work and activities 2L AAMC DMD IB exams ISEE MD/PhD programs Sentence Correction adjusting to college algorithms amino acids analysis essay athletics business skills cold emails fellowships finance first generation student functions graphing information sessions international students internships logic networking poetry proofs resume revising science social sciences software engineering trigonometry writer's block 3L Academic Interest EMT FlexMed Fourier Series Greek Health Professional Shortage Area Italian JD/MBA admissions Lagrange multipliers London MD vs PhD MMI Montessori National Health Service Corps Pythagorean Theorem Python Shakespeare Step 2 TMDSAS Taylor Series Truss Analysis Zoom acids and bases active learning architecture argumentative writing 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 escape velocity evolution executive function extracurriculars freewriting genomics 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 matrices mba medical physics meiosis microeconomics mitosis mnemonics