729. My Calendar I | Leetcode Daily (POTD) 26 Sep 2024 | Medium | Java | Hindi | TreeMap

preview_player
Показать описание
"729. My Calendar I" is a medium-level problem and the daily challenge (POTD) for 26 September 2024 on LeetCode. The solution presented in the video is coded in Java, but the approach is explained using a dry-run on a blackboard. This method makes the video accessible and beneficial for individuals with different programming backgrounds, as it focuses on the underlying logic rather than language-specific details.

*Intuition:*
We can use a `TreeMap` to store the intervals efficiently. To check if a new event overlaps, we retrieve the closest existing intervals using the `ceiling` and `floor` methods, ensuring the new event doesn't overlap with them.

Other problems for practice:

#leetcodejava #leetcode #dailychallenge #potd #hindi
Рекомендации по теме
Комментарии
Автор

nice approach ..thanx for the video . Radhe Radhe

harishbehera
Автор

Great explanation... Loved how you simplified the TreeMap approach in Java. Keep it up!

mirza_shahrukh_beg
Автор

thank you for helping us out by solving these daily questions..and if possible could you make a solution for problem LC214..it's kinda tricky so any new approaches are always good to know!

shikharsingh
visit shbcf.ru