[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Reverse-delete algorithm



 1  function ReverseDelete(edges[] E)
 2    sort E in decreasing order
 3    Define an index i ← 0
 4    while i < size(E)
 5       Define edge temp ← E[i]
 6         delete E[i]
 7         if temp.v1 is not connected to temp.v2
 8             E[i] ← temp
 9         i ← i + 1
 10   return edges[] E

I have problem in part 7.

to check whether the graph still connect.


Reply to: