Calvin and Hobbes

How often do you look up to the moon?

For me, it’s rarely. But tonight is one of those nights where I head down for a walk. It is serene.

It is always in these moments — when time stands still and I am bathed in moonlight — that thoughts in the sea of my subconscious choose to surface.

And today they ask, “Who am I?”.

Truthfully, I have never known who I was. I remember the time when I first grew aware of the concept of “self”. It was a sudden realisation. …


If you do not want to install MySQL Server and MySQL Workbench directly into your Windows machine, you can obtain it from Docker, and still link it to your Spring Boot Application running locally. Here’s how!

Create docker-compose.yml file

First, create a docker-compose.yml file in a directory you want.

docker-compose.yml

There are 2 images we specified— “mysql” and “adminer”. Adminer allows us to conveniently manage the databases created without having to use MySQL Workbench. It can also work for other databases such as PostgreSQL and MongoDB.

Start your Docker desktop app

Don’t miss out this step!

Run docker-compose up

In the directory of the docker-compose.yml, run docker-compose up. This starts the MySQL…


The Ford-Fulkerson Algorithm solves the Maximum Flow Problem from a source node to a sink node.

Pseudocode for Ford-Fulkerson Algorithm from MIT 6.046J Lecture 13: Network flow (mit.edu)

Looking at the pseudocode, we may somewhat understand it. But let’s hammer the nail fully today through an example.


How is the smallest positive integer related to the sum of integers of any sub-multiset?

If you think about it,

The smallest positive integer is always = (the maximum number that the sum of integers in any sub-multiset can represent) + 1.

… because this is the very next integer that cannot be represented by the sum of any sub-multiset. In other words, if the sum of integers in any sub-multiset can represent numbers from 1 to k - 1, then the smallest positive integer = k.

How do we express the above in a Systematic way?

Since we are given a sorted array, we start by scanning through each integer in the array. We can let the array be a.

In addition, we can…


Many of us are taught the imperative style of programming. Imperative style focusses on how to achieve the purpose of a code. This purpose is usually hidden or must be specified using comments.

For example, given a list of integers,

List of Integers

I want to first multiply each integer by 2, then store the integers that are > 5 in a new list. Then, I want to print that new list. Using the imperative style, we might do this:

Find

Themeless Place

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store