probably not. I did it like this for the exercise. Performance wise it should not matter as the recursion depth is logarithmic.