Hi, Folks! Today I solved three problems on LeetCode : Rotting Oranges, Maximize confusion in exam and Koko eating Bananas. All such examples are very conceptual as well as logical. The key point is the observation that those three problems related to our day-to-day life scenarios.
The problems related to real life easily grab our attention and easy to visualize. Real-life examples will help us remember concepts for a long time. Let me give you an 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 an array of numbers.
Rotting Oranges is another problem solved through dequeue but, it comes in real life situation form which would make the concepts more viable and interesting. So now you can distinctly see the problem related to life would seem more interesting when contrasted to mathematical problems.
This would give maximum confusion in exam- In this problem we might traverse through out the string given and keep track of length. This would allow us to interchange the post with Boolean values to get as more possible length.
Hope you might find my experience helpful.
Top comments (0)