(a) Prove that for all $a, b, c, d \in \mathbb{R}$ with $a + b + c + d = 0$,
\[
\max(a, b) + \max(a, c) + \max(a, d) + \max(b, c) + \max(b, d) + \max(c, d) \geqslant 0.
\]
(b) Find the largest non-negative integer $k$ such that it is possible to replace $k$ of the six maxima in this inequality by minima in such a way that the inequality still holds for all $a, b, c, d \in \mathbb{R}$ with $a + b + c + d = 0$.
### Part (a)

1. **Assume without loss of generality that \( \max(a, b, c, d) = a \):**
   - Since \( a + b + c + d = 0 \), we have \( 4a \geq a + b + c + d = 0 \implies a \geq 0 \).

2. **Express the sum of maxima:**
   \[
   \max(a, b) + \max(a, c) + \max(a, d) + \max(b, c) + \max(b, d) + \max(c, d)
   \]
   - Given \( a \geq b, c, d \), we have:
     \[
     \max(a, b) = a, \quad \max(a, c) = a, \quad \max(a, d) = a
     \]
   - Therefore, the expression simplifies to:
     \[
     3a + \max(b, c) + \max(b, d) + \max(c, d)
     \]

3. **Use the fact that \( a + b + c + d = 0 \):**
   - Since \( a + b + c + d = 0 \), we can write:
     \[
     b + c + d = -a
     \]

4. **Simplify the expression:**
   \[
   3a + \max(b, c) + \max(b, d) + \max(c, d) \geq 3a + b + c + d = 3a - a = 2a
   \]
   - Since \( a \geq 0 \), it follows that \( 2a \geq 0 \).

5. **Conclusion:**
   \[
   \max(a, b) + \max(a, c) + \max(a, d) + \max(b, c) + \max(b, d) + \max(c, d) \geq 0
   \]
   \(\blacksquare\)

### Part (b)

1. **Claim that \( k = 2 \):**
   - We need to show that replacing 2 of the maxima with minima still satisfies the inequality.

2. **Consider the expression with 2 minima:**
   \[
   \min(a, b) + \min(c, d) + \max(a, c) + \max(a, d) + \max(b, c) + \max(b, d)
   \]

3. **Use the properties of maxima and minima:**
   - Recall that:
     \[
     \max(x, y) \geq \frac{x + y}{2} \quad \text{and} \quad \min(x, y) \leq \frac{x + y}{2}
     \]

4. **Simplify the expression:**
   - Using the properties of maxima and minima:
     \[
     \min(a, b) + \min(c, d) \leq \frac{a + b}{2} + \frac{c + d}{2} = \frac{a + b + c + d}{2} = 0
     \]
   - And:
     \[
     \max(a, c) + \max(a, d) + \max(b, c) + \max(b, d) \geq \frac{a + c}{2} + \frac{a + d}{2} + \frac{b + c}{2} + \frac{b + d}{2} = \frac{2a + 2b + 2c + 2d}{2} = 0
     \]

5. **Combine the results:**
   \[
   \min(a, b) + \min(c, d) + \max(a, c) + \max(a, d) + \max(b, c) + \max(b, d) \geq 0
   \]

6. **Prove that \( k \leq 2 \):**
   - If \( k = 3 \), by the pigeonhole principle, some number appears twice in the minima. Let it be \( a \).
   - Consider \( a = -3000 \) and \( b = c = d = 1000 \):
     \[
     \text{Value} \leq -6000 + 4(1000) = -2000 < 0
     \]
   - This is a contradiction, so \( k \leq 2 \).

The final answer is \( \boxed{ k = 2 } \)