My journey in Competitive Programming
December 16, 2024

My journey in Competitive Programming

Hi folks! Today, I solved three problems on LeetCode: Rotting Oranges, Maximizing Chaos in Exams, and Koko Eating Bananas. All these examples are very conceptual and logical. The most important thing is to observe the connection between these three questions and our real-life scenarios.

Problems related to real life grab our attention easily and are easy to visualize. Real life examples will help us remember these concepts in the long term. Let me give you an example:

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

Rotten oranges are another problem solved using dequeue. However, it is constructed in real life, which makes the concept more relevant and attractive.

So, now you can clearly observe that real life related problems look more attractive than mathematical problems.

Maximize confusion on the exam: In this question, we can iterate over the provided string and keep track of the length. This will help us swap the positions of the boolean values ​​to get the maximum possible length.

I hope my experience helps.

2024-12-16 07:53:29

Leave a Reply

Your email address will not be published. Required fields are marked *