Get next value from column of root 's value. If  the value stored at root was last value in its  column, then assign INFINITE as next value
int nextval = ( hr . r < ( n - 1 ) ) ? mat [ hr . r + 1 ] [ hr . c ] : INT_MAX ;