Coding Interview Problem - Longest Consecutive Sequence

preview_player
Показать описание
Leetcode Question: 128

Solutions and video explanation to the commonly asked coding interview question Longest Consecutive Sequence

Timestamps:
Understanding the Problem: 0:00
Brute Force Solution: 0:50
Improved Solution #1: 2:51
Improved Solution #2: 9:21

If you like the video and found it useful please consider sharing it with other people who may be preparing for the technical interview. Also please consider liking the video and subscribing to the channel.
Рекомендации по теме
Комментарии
Автор

Thanks! The Blind 75 said that this was a graph problem, but I could not figure out why. You explanation explains why

goofenhour
Автор

Great explanation buddy😁 . I like the takeaway part and your version of solution as well.

lomeshdaheria
Автор

Dict approach and making it graph was excellent.

arnabganguly
Автор

really a fabulous explanation . keep going bro. your videos deserve more views and subscribers . Generally people explain only the improved version . But your videos clearly explaining the differences between the various approaches . This aspect is extremely important for coding interviews

balaeinstein
Автор

Video quality and explanation is very good, Hoping to see more videos. All the best !

prasanth
Автор

Thank you for your great explanation. It seems like you recently started your channel. wish you all the best

arashbarmas
Автор

was the second solutions called union finder or was it different ?

nicholas_as
Автор

so I have a question with the time complexity analysis at 6.30. Agreed that we inspect numbers1 through 5 in the while loop and then we break to go back to the for loop but now we are still visiting all the numbers that we have already visited although the if condition fails. So my question is shouldnt it still be an O(n^2) time?

srimanyadagiri