Solve Graph Valid Tree 7 by union find method with the optimizations

preview_player
Показать описание
00:00 optimized one has lower complexity
00:41 find method: path compression
02:10 code walkthrough
02:58 union method: merge smaller set into larger set
04:53 code walkthrough
06:06 time complexity
Рекомендации по теме