Reversing words in a string method I tried using recursion for this.
Here is the code
  public static string ReverseWords(string str)
  {
    var splitArr = str.Split(&quot; &quot;);
    if(splitArr.Length == 1)
      return splitArr[0];
    
    return splitArr[splitArr.Length - 1] + &quot; &quot; + ReverseWords(String.Join(&quot; &quot;, splitArr.Take(splitArr.Length - 1));
  }
This is horribly inefficient both in terms of storage and runtime:

As already mentioned in comments (though not spelled out) recursion has a memory overhead directly proportional to the number of iterations - which in you case is input size.

Remember - every function call takes up stack space, and a recursive call is the same as regular call!

You create extra temporaries by rejoining the string you just split for the recursive call and having a string concatenation on each iteration.

That's two new strings create in every step in addition to the split array!

Everything mentioned in step 2 takes processing time as well as memory.

You will not notice this overhead with any string you might type in a console for testing, but try reading and reversing a sizable text file, and the problem will become apparent.