Open in app
Home
Notifications
Lists
Stories

Write
Calvin Ho
Calvin Ho

Home

Aug 9, 2021

A simple git workflow

Git 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…

Git

2 min read


May 23, 2021

Wrap-around Indexing in Deques

If 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 Science

2 min read


May 19, 2021

Calculating the Total Number of Nodes in a Perfect Tree

A 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 Science

2 min read


May 19, 2021

How to Pass Input Files to stdin in VSCode

TLDR: 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…

Vscode

1 min read

Calvin Ho

Calvin Ho

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable