Great explanation! In this case instead of StackOverflowError can appear even when the base case is defined whenever Stack space is exhausted. We would hit NullPointerException if we did not specify the base case, because we would try to access `getLeftChild()` or `getRightChild()` method of a null object in a recursive call.
brilliant video, really helped me understand this as i struggle through the concept in college classwork .... thank you so much to the creators!
Great video and great channel! all the videos are very well explained, easy to understand, and straight to the point. Thank you
Thanks a lot for the support :) Glad you're enjoying our videos!
Great explanation! In this case instead of StackOverflowError can appear even when the base case is defined whenever Stack space is exhausted. We would hit NullPointerException if we did not specify the base case, because we would try to access `getLeftChild()` or `getRightChild()` method of a null object in a recursive call.
Hey bro this has nothing to with REAL TREES
🤮