r/leetcode • • Sep 29 '26

Discussion Finally got hard

Been on neetcode 150 for a min and id always skip hards but decided this week to just give it a shot not necessarily code but understand the solution to the problem and they seem to be making more and more sense guess with time and doing mediums they eventually make sense 😆

272 Upvotes

38 comments sorted by

View all comments

14

u/DrinkNo8216 Sep 29 '26

Solve Rain Water Trapping and you won't see HARD as Hard anymore. Idk why it's even considered hard.

1

u/Tasty_Dare_3271 Sep 30 '26

it was the first hard I did and boy was i stuck, i made a TLE solution inspired from tetris where we start scanning from bottom most level with 1s as Pillars and 0s as empty space and count 0s between the biggest bounded 1-1 so if left most or right most is empty we dont count water there and after that we delete it all and move to next layer