There are n recursive calls (O (n)), each with a constant cost (O (1)), so the overall cost is again O (1) * O (n) = O (n). However, if you time it, you may notice that the recursive version runs ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results