If both start and bucket reached end then return 0 else that arrangement is not possible so return INT_MAX
if ( start == N ) : NEW_LINE INDENT if ( bucket == K ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT return 10 ** 9 NEW_LINE DEDENT