How to solve this graph problem in O(N^2) ?

Правка en1, от drexdelta, 2024-12-09 16:47:07

Hi all, I have just now solved this leetcode problem in O(N^3).

I am curious if we can solve this problem in O ( N ^ 2 ) ?

For those, who are interested in understanding O ( N ^ 3 ) approach, please let me know, I will try my best to explain.

MY code for O ( N ^ 3 )
Теги graphs, optimisation

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский drexdelta 2024-12-09 16:47:07 2901 Initial revision (published)