**Introduction**Recently I’ve got to solve a problem on LeetCode, and decided to write this article because, even though it was not extremely hard, the whole complexity was in the precomputation of some data. Let’s have a look:

**The Problem**As already mentioned, I came across this medium-difficulty problem while solving a coding challenge on LeetCode. The title is

A

good mealis a meal that containsexactly two different food itemswith a sum of deliciousness equal to a power of two.You can pick

anytwo different foods to make a good meal.Given an array of integers

`deliciousness`

where`deliciousness[i]`

is the deliciousness of the`ith`

item of food, returnthe number of differentgood mealsyou can make from this list modulo`109 + 7`

. …

**Introduction**I’ve recently come across one of the thousands of problems that can be solved with

**Introduction**In this article, we are going to study and solve the medium difficulty LeetCode challenge

**The Problem**First off, let me ctrl-c ctrl-v the problem description:

Alice and Bob take turns playing a game, with

Alice starting first.There are

`n`

stones arranged in a row. On each player's turn, they canremoveeither the leftmost stone or the rightmost stone from the row and receive points equal to thesumof the remaining stones' values in the row. …

**Introduction**Throughout this article, we are going to be analyzing an interesting coding challenge that I’ve recently happened to solve. Those of you who love problem visualization as I do might end up being disappointed because this time I didn’t manage to come up with a satisfying visualization of the problem, however, I’ll try my best to run you through the thoughts that led me to the solution.

**The problem**As usual, this is one of the problems that I found while brushing up my algorithmic skilled on LeetCode. This medium difficulty problem is titled

Alice and Bob take turns playing a game, with Alice starting first. …

**Introduction**In this article, we will be going through the solution to a coding challenge that I’ve recently had the pleasure to solve taking one of the LeetCode contests. Other than the solution itself, I’ll be providing an easy visualization that hopefully will make everything really simple to grasp.

**The problem**I’m not going to spend much time here, let me just copy-paste the description of this problem titled “

You are given an integer array

`nums`

sorted innon-decreasingorder.Build and return

an integer array`result`

with the same length as`nums`

such that`result[i]`

is equal to thesummation of absolute differencesbetween`nums[i]`

and all the other elements in the array.…

**Introduction**Recently I’ve got to spend some hours thinking of a useful visualization for a problem whose key point is a pretty straightforward intuition. I am a stronger believer in visualization to help make a concept stick. That being said, I have got to be honest, am not sure if I pulled it off this time, but eventually came up with something that I liked. Let me know your thoughts.

**The Problem**Let’s start with the description of this problem which has been labeled as hard by LeetCode. The title is “

You are given an array

`tasks`

where`tasks[i] = [actuali…`

**Introduction**

In this article, we will be solving and discussing the solution to one of the problems that I have recently got to work on. I reckon that it deserves some attention, not for its complexity, but because it requires the developer to do a little analysis and precomputation on the input data to pave the way for an easy solution.

**The Problem**I have recently come across this problem while brushing up my algorithmic skills by solving a coding contest on LeetCode. It is titled

You are given an integer array

`nums`

. You can chooseexactly oneindex (0-indexed) and remove the element. Notice that the index of the elements may change after the removal. …

**Introduction**In this article, we are going to be discussing an algorithm that lends itself to visualization. We will get started from a concrete problem, a code challenge that I’ve recently got to solve, trying to figure out a general approach that can be reused in many other circumstances.

**The Problem**This is a medium difficulty LeetCode problem called

Given a string

`s`

, returnthe maximum number of unique substrings that the given string can be split into.You can split string

`s`

into any list ofnon-empty substrings, where the concatenation of the substrings forms the original string. However, you must split the substrings such that all of them areunique. …

**Introduction**In this article, I’ll be trying to describe a rather common Dynamic Programming technique used to solve an interesting coding challenge taken from one of the contests that you can find on LeetCode.

As DP (Dynamic Programming) can be a tricky concept, sometimes hard to grasp, I’ve endeavored to produce some pictures which will help to get the point across.

**The problem**I came across this problem while taking a LeetCode contest. The title of the problem is

You are the manager of a basketball team. For the upcoming tournament, you want to choose the team with the highest overall score. The score of the team is the

sumof scores of all the players in the team. …

**Introduction**

In this article, we are going to analyze part of the fascinating Binary Tree world. The applications of this data structure are limitless, and even though it might be a bit scary at first, I promise that with the help of some pictures and visualizations, we will be getting acquainted with it, and hopefully learning something new.

As usual, I like to start from a practical problem, why not the coding challenge which got me to write this post? So let’s kick this off.

**The Problem**

While practicing coding on LeetCode, I came across the *Path In Zigzag Labelled Binary Tree*** **challenge. …

About