How to remove Main.Storyboard in xCode (iOS 13)

I had spent about 2 weeks on the app project when I realised that I made a big mistake: I started implementing everything on the Storyboard! As the project got bigger, the storyboard got extremely slow and my development efficiency plummetted. I would have said that whether to use storyboards...
Read More

Understanding Scapegoat Trees

What is a scapegoat tree? Wikipedia: In computer science, a scapegoat tree is a self-balancing binary search tree. It provides worst-case O(log n) lookup time, and O(log n) amortised insertion and deletion time. This post is a note that attempts to make the original paper by Igal Galperin and Ronald...
Read More

Process Synchronization

Wikipedia: Thread synchronization is defined as a mechanism which ensures that two or more concurrent processes or threads do not simultaneously execute some particular program segment known as critical section. Race Condition & Critical Section Problem Consider the following producer and consumer programs: //producer process while(true){ while(counter==BUFFER_SIZE){ // buffer is...
Read More

Binary Trees Explained

Getting Started… A binary tree is an ordered tree with the following properties: Every node has at most two children Each child node is labeled as being either a left child or a right child. A left child precedes a right child in the order of children of a node....
Read More

Let's Talk About Hash Tables

Wikipedia: In computing, a hash table (hash map) is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets or slots, from which the desired...
Read More

Skip List Implementation with C++

In computer science, a skip list is a data structure that allows O(log(n)) search complexity as well as O(log(n)) insertion complexity within an ordered sequence of n elements. You can read more about it on Wikipedia In this post I’d like to jot down the notes that prove the asymptotic...
Read More

LinkedList Implementation With C++, malloc Or Not?

The Problem linkedList is a linear data structure, in which the elements are not stored at contiguous memory locations, but in “nodes”. When implementing a linked list with C++, I encountered a curious error when initiating a new node struct that holds the data. Here’s the implementation of the push...
Read More

How To Score Almost 170 On GRE's Verbal Section

GRE’s Verbal Section can be difficult for students whose first language is not English, but with lots of practices, it is more than likely to get a near perfect score. About Me My first language is Mandarin Chinese and I scored 169/170 on GRE’s verbal section in February 2019. 8...
Read More

Vocabulary Highlighter, a Chrome Extension

Vocabulary Highlighter is a Google Chrome Extension that automatically highlights high-frequency GRE words as you browse the web. Why build Vocabulary Highlighter? When I was preparing for the GRE, I knew that memorising a decent number of GRE level vocabulary is required in order to do well in the verbal...
Read More

How A Finance Major Picks Up Programming In Python

So I wanna learn programming as a business major, but I only want to learn things that [are/can be/might be] useful for my job. Where do I start? Yes, it’s just like the English mania that stormed Asia in the 90s all over again. Since former U.S. President Barack Obama...
Read More