Course: Harvard’s CS50
Problem Set 1: C
pset1/hacker1 is an introductory assignment to get your feet wet in C.
Demonstration of how someone can use binary search to make a correct guess (find a target value) faster than linear search.
A quick look at a simple ‘greedy’ algorithm.
Make a horizontal chart.
Make a vertical chart.
Check for ‘apparent’ validity of credit card numbers.
One small detail that had me scratching my head in hacker1′s ‘Bad Credit’ assignment was something I missed the first, second and third time I read through the text…
Okay, let’s multiply each of the underlined digits by 2 […]
Now let’s add those products’ digits (i.e., not the products themselves) together
Meaning: if the multiplication result is > 9 add the result’s digits together.
(ie. 2×8=16 –> 1+6 = 7)
That little hint probably got you going, and you can take care of the rest of the code yourself.
These examples go beyond what you may be required to know at this point and/or the pset specifications.