Leetcode 218 | Skyline Problem (Array Sorting | PriorityQueue | Heap)

  Рет қаралды 9,151

The Tech Granth

The Tech Granth

Күн бұрын

Пікірлер: 23
@jillwark2782
@jillwark2782 3 жыл бұрын
I liked the discussion, particularly the negative height and which you took it as an advantage in the priority queue.
@TheTechGranth
@TheTechGranth 3 жыл бұрын
Thanks a lot. Hope the video helped you. Do like and subscribe and share it with others. BTW the same concept can help in solving meeting room problems as well.
@namahshivaya9874
@namahshivaya9874 2 жыл бұрын
Wow. I struggled to understand this, and your explanation was simply the best of all of them. Thank you!
@muraliKrishnaanimi
@muraliKrishnaanimi 3 жыл бұрын
isn't pq.remove() is costly? In c++ priorty_queue from stl has no option for remove(). any ideas to optimize?
@TheTechGranth
@TheTechGranth 3 жыл бұрын
Time complexity of remove is O(logn) some way to handle in C++ stackoverflow.com/questions/19467485/how-to-remove-element-not-at-top-from-priority-queue
@obulpathi2729
@obulpathi2729 Жыл бұрын
Excellent m..you nailed it, thanks for explaining!!
@ameynaik2743
@ameynaik2743 3 жыл бұрын
Nice solution, what is the approach to remove a specific element from pq in python? Looks like I need to use sortedList instead of heapq?
@TheTechGranth
@TheTechGranth 3 жыл бұрын
Can you check if this works stackoverflow.com/questions/10162679/python-delete-element-from-heap
@madmax2442
@madmax2442 3 жыл бұрын
Great explanation and walkthrough! Glad that I found you channel :)
@TheTechGranth
@TheTechGranth 3 жыл бұрын
Thank you, hope it was helpful. Do share with others as well and do not forget to like and subscribe :) Do let me know in case you need video explanation for some other problem or system design
@madmax2442
@madmax2442 3 жыл бұрын
@@TheTechGranth yeah sure!
@madmax2442
@madmax2442 3 жыл бұрын
@@TheTechGranth Please make an explanation video for the problem: leetcode.com/problems/maximize-grid-happiness/
@TheTechGranth
@TheTechGranth 3 жыл бұрын
@@madmax2442 sure will try to come up with this ASAP
@harpercfc_
@harpercfc_ 2 жыл бұрын
Phenomenal explanation. Thank you dude 🥰
@roliverma4483
@roliverma4483 3 жыл бұрын
Very well explained
@TheTechGranth
@TheTechGranth 3 жыл бұрын
Thank you!!! Do check out the other videos of leetcode solution, system designs and microservices!!!
@roliverma4483
@roliverma4483 3 жыл бұрын
@@TheTechGranth Definitely
@abhinavyel166
@abhinavyel166 3 жыл бұрын
Nicely explained
@TheTechGranth
@TheTechGranth 3 жыл бұрын
Thank you :) !!! Do hit that like button and share it with your friends and Subscribe :)
@rathan235
@rathan235 Жыл бұрын
Great job
@sudhanshumishra935
@sudhanshumishra935 3 жыл бұрын
Hehe coding
@himanshuchhikara4918
@himanshuchhikara4918 3 жыл бұрын
Nicely explained
@TheTechGranth
@TheTechGranth 3 жыл бұрын
Thanks Himanshu. Hope you liked it, do check out the other videos and playlist. Kindly like subscribe and share it with your friends :)
Find the Skyline Problem with C++ Solution Explained
10:49
mCoding
Рет қаралды 49 М.
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 19 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 28 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 129 МЛН
8 patterns to solve 80% Leetcode problems
7:30
Sahil & Sarra
Рет қаралды 445 М.
2 Years of C++ Programming
8:20
Zyger
Рет қаралды 6 М.
Skyline Problem
22:54
Tushar Roy - Coding Made Simple
Рет қаралды 194 М.
I never understood why you can't go faster than light - until now!
16:40
FloatHeadPhysics
Рет қаралды 4 МЛН
The Skyline Problem
19:37
IDeserve
Рет қаралды 38 М.
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,2 МЛН
[LeetCode]218. The Skyline Problem 中文
17:38
山景城一姐
Рет қаралды 7 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 836 М.
LeetCode 218. The Skyline Problem
19:02
Happy Coding
Рет қаралды 10 М.