Since indexes are 0 based , node 11 means index 11 - 1 , 8 means 8 - 1 , and so on
int u = 11 , v = 9 ; cout << " Max ▁ edge ▁ between ▁ " << u << " ▁ and ▁ " << v << " ▁ is ▁ " ; maxEdge ( u - 1 , v - 1 , n , chain_heads ) ;