Thank you so much for this! I had thought about storing the indices for the free space blocks in order but couldn't figure out how to implement it. Went from a 30+ minute brute-force disaster that didn’t even yield the correct result to a 0.02s valid run, lol.
Thank you so much for this! I had thought about storing the indices for the free space blocks in order but couldn't figure out how to implement it. Went from a 30+ minute brute-force disaster that didn’t even yield the correct result to a 0.02s valid run, lol.
Thank you. I really enjoyed your video :)
Thanks! It was really helpful
Thanks for the video I use Segment tree + Binary search to get an O(n log n) Solution.