This image is not particularly packed with information. It is just inserted becaue pictures are more fun.

The Sliding Window Median problem has a deceptively simple name, but its solution is definitely not as simple as the name implied. This article aims to provide a very thorough solution to the problem and considerations of all related concepts. Hopefully, this is the last article you need to read about this kind of problems and it is as informative as you want. Let’s get started!

The problem definition is as follows:

Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. …


The whole COVID-19 situation threw me into panic mode. On the Internet bad news are followed by another bad news or worse news. Although there are many articles published about the hacks and survival guides during this time, I didn’t see many good news or reports of hope. That’s when I knew what I had to do when feeling panic — try to see the hope and share it with other people.

I believe in God. Please allow me to first define what I mean by “God”.

Our existence depends on the existence of many other things. For example, your…


How to Solve the Burst Balloons Problem like a Piece of Cake

The Burst Balloons Problem

Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i you will get nums[left] * nums[i] * nums[right] coins. Here left and right are adjacent indices of i. After the burst, the left and right then becomes adjacent.

Find the maximum coins you can collect by bursting the balloons wisely.

I encountered the Burst Balloons Problem on leetcode and…

Zhao Chen

I’m a software engineer/machine learning engineer and I love human beings.

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