atofigh / edmonds-alg

Implementation of maximum branching algorithm (max spanning tree in directed graphs)
MIT License
25 stars 4 forks source link

Time complexity #4

Open NikitaMishin opened 4 years ago

NikitaMishin commented 4 years ago

https://github.com/atofigh/edmonds-alg/blob/450d192bb839554b5cf61d4d1472a214ac77cdf4/src/edmonds_optimum_branching_impl.hpp#L386

Is time complexity really O(n^2)? Just 2 for loop gives some suspicious of O(n^3) for worst case scenario (for example if we have complete oriented graph).