Friday, September 9, 2016

#algorithm discussion continued
Today we continue reading the flow networks. We were looking at maximum flows
Maximum flows can also be calculated using "push-relabel" method>
.This method performs two basic operations: pushing flow excess from a vertex to one of its neighbors and relabeling a vertex.The proof to show that preflow under such conditions becomes maximum will be discussed shortly.
#codingexercise
Void getmiddle(node head,  ref int start, ref int offset, ref node middle)
{
If (head == null) return;
Start = start  + 1;
getmiddle(head.next, k, ref count, ref offset ref middle);
Offset = offset + 1;
if (offset== start/2) { middle = head;}
}

No comments:

Post a Comment