DEV Community

Karthika Movva
Karthika Movva

Posted on

Today's Problem Solving

Hi, Folks! Today, I solved three problems on LeetCode : Rotting Oranges, Maximize confusion in exam, and Koko eating Bananas. All these examples are very conceptual and logical. The most important part is to observe that these three problems connect to our real life scenarios.

The problems that are related to real life can easily grasp our attention and easy for visualize. The real life examples will help us to remember the concepts for long time. let me give you a example:

Sliding window maximum is a problem solved using dequeue. When you first read the problem statement, it may seem like a purely mathematical problem involving array of numbers.

Rotting Oranges is another problem solved using dequeue. but, it is framed in a real life situation, which makes the concept more relatable and engaging.

So, now you can clearly observe that the problem related to real life will look more engaging when compared to mathematical problems.

Maximize confusion in exam : In this problem we can traverse through out the provided string and keep track of length. This will help us to interchange the position of Boolean values to get maximum possible length.

I hope my experience is helpful.

Top comments (0)