Tag: computer science
-
Execution Context in Javascript

One of the more difficult topics I’ve been learning about in OOP is the idea of execution context. I’ll start by illustrating an issue I got caught in. In this code snippet, I created a new class, Person with a constructor function for name and age. I then added the function `aboutMe` to its prototype…
-
Programming: K-Sum
One type of problem that consistently stumps me when solving LeetCode questions has to do with finding unique sub-arrays of a longer array and then checking something about those sub-arrays. Let’s break down the concept of finding the number of combinations that sum up to a target, also known as the k-sum problem. To find…