# 20.06.2026 [1840. Maximum Building Height]
20.06.2026 [1840. Maximum Building Height](https://leetcode.com/problems/maximum...) hard [substack](https://open.substack.com/pub/dmitrii...) #### Join me on Telegram https://t.me/leetcode_daily_unstoppab... #### Problem TLDR Max growing height with restrictions #### Intuition ```j // 123456789 10 11 // 123456543 21 // 1 6 3 // 1 2 3 4 5 6 7 8 9 10 // 0 5 3 4 3 // // some restriction in the middle can backtrack // // 30 minutes, hints: two passes // 48 minute: my formula is wrong // 56 minute: give up ``` adjust restrictions with forward anb backward passes for each restriction interval the max height = (L+R+d)/2, solve 2D geometry #### Approach on backward pass we already can calculte the max we can use 'previous' height and solve in O(1) memory, or use helper collection with 0 and n-th positions #### Complexity Time complexity: O(nlogn) Space complexity: O(n|1) #### Code https://dmitrysamoylenko.com/leetcode/
![# 23.06.2026 [3699. Number of ZigZag Arrays I]](https://i.ytimg.com/vi/4ARmo1QHhB8/hqdefault.jpg?sqp=-oaymwE9CNACELwBSFryq4qpAy8IARUAAAAAGAElAADIQj0AgKJDeAHwAQH4Af4JgALQBYoCDAgAEAEYVyBgKGUwDw==&rs=AOn4CLBry0ACv71KMZ6DToOI3HZhNik5Uw)
# 23.06.2026 [3699. Number of ZigZag Arrays I]

If You Have A Bad Memory, I’ll Help You Fix It In 28 Minutes

Terence Tao: Nobody Understands Why AI Actually Works
![# 12.06.2026 [3559. Number of Ways to Assign Edge Weights II]](https://i.ytimg.com/vi/EwfsrTTu_NU/hqdefault.jpg?sqp=-oaymwE9CNACELwBSFryq4qpAy8IARUAAAAAGAElAADIQj0AgKJDeAHwAQH4Af4JgALQBYoCDAgAEAEYUiBeKGUwDw==&rs=AOn4CLCzedN0PXBEXhUEc1oH9m_5aOwFZg)
# 12.06.2026 [3559. Number of Ways to Assign Edge Weights II]

Using Large Language Models | Build Your Own LLM Workshop #1
![# 26.06.2026 [3739. Count Subarrays With Majority Element II]](https://i.ytimg.com/vi/Ej-Equz8M_M/hqdefault.jpg?sqp=-oaymwE9CNACELwBSFryq4qpAy8IARUAAAAAGAElAADIQj0AgKJDeAHwAQH4Af4JgALQBYoCDAgAEAEYRiBTKGUwDw==&rs=AOn4CLA8OvTYYsfcTTGXLzyt0XN3OJGlww)
# 26.06.2026 [3739. Count Subarrays With Majority Element II]

How I animate 3Blue1Brown | A Manim demo with Ben Sparks
![# 18.06.2026 [1344. Angle Between Hands of a Clock]](https://i.ytimg.com/vi/Wq31E31505Y/hqdefault.jpg?sqp=-oaymwE9CNACELwBSFryq4qpAy8IARUAAAAAGAElAADIQj0AgKJDeAHwAQH4Af4JgALQBYoCDAgAEAEYYyBjKGMwDw==&rs=AOn4CLAwXspPWvbMldSaBFdzbRrR6bR7QQ)
# 18.06.2026 [1344. Angle Between Hands of a Clock]

Deep Dive into LLMs like ChatGPT

People Who Messed With The Royal Guard and Regretted It!

How To Think SO CLEARLY People Assume You're A Genius

Rowan Atkinson's Brilliant Humor Leaves Celebrities in Tears!

Sieht einfach aus? – Löse das Gleichungssystem!

Incredible Street Performers – Caught on Camera

You Know This Song (but the Orchestra Doesn’t) | Jacob Collier & VSO School of Music Orchestra | TED

How US Air Force B 52 Pilot Performed an Emergency Takeoff at Full Speed

Data Structure and Algorithm Patterns for LeetCode Interviews – Tutorial

Abstract Black and White wave pattern| Height Map Footage| 3 hours Topographic 4k Background

JANITOR vs THE BIGGEST GUYS IN THE GYM. They Didn’t Expect THAT

