LeetCode ๐Ÿ”๏ธ/Graph

LeetCode ๐Ÿ”๏ธ/Graph

32. Graph Valid Tree

Description: Solution:

LeetCode ๐Ÿ”๏ธ/Graph

269. Alien Dictionary

Descripition: Solution:

LeetCode ๐Ÿ”๏ธ/Graph

128. Longest Consecutive Sequence

Description: Solution: Sorthing is O(nlogn), so we need a solution for O(n) if (n - 1) not in numSet, it would be the first start point of sequence. In while loop, we keep add the length by 1 to see how long the sequence is. And then, return the longest sequence. Time Complexity: O(n) Space Complexity: O(n)

LeetCode ๐Ÿ”๏ธ/Graph

417. Pacific Atlantic Water Flow

Description: Solution: Time Complexity: O(nm)

LeetCode ๐Ÿ”๏ธ/Graph

207. Course Schedule

Description: Solution:

LeetCode ๐Ÿ”๏ธ/Graph

133. Clone Graph

Description: Solution: Time Complexity: O(n)

KB0129
'LeetCode ๐Ÿ”๏ธ/Graph' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก