Function to find minimum difference between the largest and smallest element after K replacements
def minDiff ( A , K ) : NEW_LINE INDENT if ( len ( A ) <= K + 1 ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT DEDENT