All my solutions to problem sets from Harvard's Introduction to Computer Science. In it's own words: "Introduction to the intellectual enterprises of computer science and the art of programming. This course teaches students how to think algorithmically and solve problems efficiently. Topics include abstraction, algorithms, data structures, encapsulation, resource management, security, and software engineering. "
Languages:
- C
- Python
- SQL
- HTML/CSS/Javascript
Langauge: Scratch
- Scratch: Implement a project of your choice in Scratch (I built Snake).
Langauge: C
- Hello: Print "hello, world."
- Mario (more comfortable): Print hashtags in the shape of a pyramid from Mario.
- Credit: Write an algorithm which validates credit card numbers.
Langauge: C
Note that the course was updated from the 2019 to the 2020 version whilst I was tackling pset2 so for this week I have solutions for both syllabi.
2019:
- Vigenere: Implement Vigenere's cypher.
- Crack: Command line program that cracks passwords hashed by C's
<crypt>
function.
2020:
- Readability: Write a program which determines the approximate reading grade required to understand a text.
- Substitution: Implement a substitution cypher.
Langauge: C
- Plurality: Program that runs a plurality or 'first-past-the-post' election.
- Tideman: Program that runs a Tideman election.
Langauge: C
- Filter (more comfortable): Program that applies filters to BMPs.
- Recover: Write a program that can recover a JPEG from a forensic image.
Langauge: C
- Speller: Implement a program that spell checks files using a hash table.
Langauge: Python
Sentimental (same as pset 1/2 but using Python):
New:
- DNA: Implement a program that identifies a person based on a csv file representing DNA.
Langauge: SQL, Python
- Movies: Write SQL queries to answer questions about movies using IMDb.
- Houses: Implement a program that imports student data into a database and then creates class rosters.
Langauges: HTML, CSS, Javascript, Python (Flask), SQL
- Finance: Create a website where users can "lookup", "buy" and "sell" stocks.