3 ms·
When using switch expression in C#, they are a lot more similar: public int Fib(int n) => n switch { <= 1 => n, _ => Fib(n - 1) + Fi
by mrsmrtss 10mo ago
When using switch expression in C#, they are a lot more similar:
public int Fib(int n) => n switch
{
<= 1 => n,
_ => Fib(n - 1) + Fib(n - 2)
};