6/15/16 – Continued
Read chapter 6 of Grokking Algorithms
- Breadth-first Search
- What are graphs
- Directed graphs vs Undirected graphs
- Queues (FIFO) vs Stack (LIFO)
- Implementing the algorithm in Python
- Topological sort
- Website discovered: http://c.learncodethehardway.org/book/index.html (free resource)
- He says: “LCTHW will not be for beginners, but for people who have at least read LPTHW or know one other programming language.”
- Hopefully I can get something out of it regardless.
- LCTHW Exercise 1: Dust Off That Compiler
- Didn’t get much done today. Pretty bummed about it. 😕
- I don’t like to jump around too much though so I don’t think I’ll go too deep into it, only up until the workshop. CS50 is my main focus.
- Is console.log same as the cs50 printf function?
CS50 walkthrough videos:
- Sigma function
- Coursera is changing platforms and getting rid of 400+ courses so I downloaded a few good ones before they are gone:
- Algorithms Part I by Kevin Wayne and Robert Sedgewick (Princeton University)
- Algorithms Part II by Kevin Wayne and Robert Sedgewick (Princeton University)
- Compilers by Alex Aiken (Stanford University)
- Introduction to Mathematical Thinking by Dr. Keith Devlin (Stanford University)
- Breezing through it since it’s all a refresher from CS50 just with different style/words.
- Worked on Reddit Daily Programmer problem “CRITICAL HIT”. It is classified as easy. Also it can be solved with recursion.
- You can see the problem here: https://www.reddit.com/r/dailyprogrammer/comments/4nvrnx/20160613_challenge_271_easy_critical_hit/
Critical hits work a bit differently in this RPG. If you roll the maximum value on a die, you get to roll the die again and add both dice rolls to get your final score. Critical hits can stack indefinitely — a second max value means you get a third roll, and so on. With enough luck, any number of points is possible.