Aug 9, 2021A simple git workflowGit can be daunting to beginners, and it took me awhile before I got comfortable with a lot of the commands. I am assuming you have cloned your repository to your local machine. Here is the workflow that I use: Git workflow for new branch Create an issue on GitHub Update local main branch: git…Git2 min read
May 23, 2021Wrap-around Indexing in DequesIf you’ve ever had to write an implementation of a queue using a circular array, you’d be familiar with this formula: Here, last is the index of the last element in your queue and N is the size of length of the underlying array for your queue. This formula allows…Computer Science2 min read
May 19, 2021Calculating the Total Number of Nodes in a Perfect TreeA perfect n-ary tree (a.k.a. a full tree) is a tree where all of its nodes with the exception of external nodes have exactly n children. For a binary tree, n = 2. In a perfect binary tree, the number of nodes at each height is given by 2ʰ, where…Computer Science2 min read
May 19, 2021How to Pass Input Files to stdin in VSCodeTLDR: Add the following to your launch.json file and the VSCode debugger will pass data to stdin from a file called input located in your workspace folder. "args": ["<", "${workspaceFolder}/input"], I recently started trying out Google’s Kick Start competition to hone my skills. One of the things that initially confused…Vscode1 min read