Intro to CS: Lecture 22 - Big Oh and Theta

Topics: Complexity: Big-Oh notation, Big-Theta notation, complexity relations and classes, calc-complexity Getting introduced to the python time.perf_counter() function. This is new to me. I guess its a more accurate version of time.time(). We compare the runtime of a few different functions. The plots of input size vs. runtime …



Intro to CS: Problem Set 4

Finished the problem set in about 2.6 hours. It was a good exercise. Github link to my solution: https://github.com/miguelHx/intro-to-cs-mit-problem-sets/tree/main/1_ps4



Intro to CS: Lecture 20 - Fitness Tracker OOP Example

Topics: Inheritance: more examples Reinforcing same concept as previous lectures but with a more involved example. I learned something new. You can get the class state by doing something like this: SimpleWorkout.__dict__.keys() You can do the same on an instance variable. Most of this was review for me …



Math for CS: Problem Set 4 Thoughts

Problem 1: I have an idea of how to solve this problem. I just need to prove that no matter what step we take from (m, n), except when m = 0 and n = 0, m and n will never be equal to each other. I could look up an example …



Intro to CS: Lecture 19 - Inheritance

Topics: Inheritance: hierarchies, subclasses, using inherited methods, examples We start with reviewing the basics of a class and objects. Getter and setter methods. Data attributes, code style, some examples. Going over hierarchies and implementing in code, which is just using sub-classes. Overriding parent methods. Class variables are shared between all …



Systematic Program Design: Week 10 - Accumulators

Accumulators Module The rules we have been using to generate structural recursion templates are very powerful. They make it very easy to write functions that traverse complex data collecting information at every place in that data. The power of these rules is highlighted by our ability to design abstract fold …



Intro to CS: Lecture 18 - More Python Class Methods

Topics: Object Oriented Programming: dunder methods, examples We start with a review of classes and methods from last lecture. Class vs. instance of a class. All review for me, of course, but I like to observe how they teach it. Dunder methods review. Why OOP and bundling the data in …



Intro to CS: Lecture 17 - Python Classes

Topics: Object Oriented Programming: data abstraction, class def, class instances, methods More review for me. I don’t mind reviewing though. We start by defining an object, along with examples. Advantages of OOP Bundle data into packages together with procedures that work on them through well-defined interfaces Divide and conquer …



Intro to CS: Lecture 16 - Recursion on Non-Numerics

Topics: Recursion: Fibonacci, Fibonacci with a dict, recursion on non-numerics, recursion on lists, Towers of Hanoi (extra) We start by reviewing fibonacci and tracing through the function call graph. Recursion in general is review for me, I still think this lecture is good for me to digest. After doing another …



Systematic Program Design: Week 9b - Search

Search Module In this module, we will expand on generative recursion and work on search problems, which are a category of problem solving that can be solved by generating the space of all possible paths from a given state and traversing that space until a solution is found. We will …