Driver code
arr = [ [ 5 , 0 ] , [ 3 , 0 ] , [ 2 , 0 ] , [ 6 , 4 ] , [ 1 , 0 ] , [ 4 , 3 ] ] NEW_LINE n = len ( arr ) NEW_LINE a = 6 NEW_LINE b = 5 NEW_LINE print ( getDistance ( arr , n , a , b ) ) NEW_LINE