Directed Graph | Largest Connected Component

Правка en1, от pqpq123, 2025-01-23 21:05:43

There is a graph (might have cycles) in the form of an adjacency list. How can we find the 'size' of the largest connected component?

Example: 0: 1 2 1: 2: 1 3 3: 1 2 4 4: 2 3

Answer: 5 Reason: We start from 0 and go to 1 and 2, from 2 we can reach 3, from 3 we can reach 4.

What can be the most efficient way to calculate this?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский pqpq123 2025-01-23 21:05:43 400 Initial revision (published)