Count Good Meals — Algorithms&Visualizations

Photo by Rachel Park

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…