Longest Consecutive Sequence LeetCode Question Explained | Set Solution

preview_player
Показать описание
In this video we will look at solving Longest Consecutive Sequence by sorting and then optimizing by using a map

00:00: LeetCode Problem + Examples
00:54: Sorting solution
02:01: Step by step: Set solution
05:19 Live Code
Рекомендации по теме
Комментарии
Автор

great explanation for union and find algorithm.
please provide more videos about union and find
many thanks

aminesfahani
Автор

Doesn't the while loop inside the for loop makes the total time complexity greater than O(n) where n is length of the array?

KietNguyen-jqql