Count of Missing Numbers in a sorted array | Function that find the count of missing numbers in array a [ ] ; Calculate the count of missing numbers in the array ; Driver Code
def countMissingNum ( a , N ) : NEW_LINE INDENT count = a [ N - 1 ] - a [ 0 ] + 1 - N NEW_LINE print ( count ) NEW_LINE DEDENT arr = [ 5 , 10 , 20 , 40 ] NEW_LINE N = len ( arr ) NEW_LINE countMissingNum ( arr , N ) NEW_LINE