Apr 17, 2025
sayHi method that continually calls itself will print "hi" endlessly until a stack overflow occurs.count) to control recursion depth:
count <= 1.count to work towards the base case.count of 3:
sayHi and decrements the count each time.count of 100,000 may exceed stack memory.