Back

Practice By Tag: Basic Rules of Probability

Question: 2017 Winter Midterm - 15
1 . Consider the recursive algorithm $\Hello$, which takes as input an integer $n \geq 0$: (see document for missing code) If we run algorithm $\Hello(7)$, how many times is the word "hello" printed?
(a)
5
(b)
7
(c)
6
(d)
4