Trying to understand the time and space complexity of this algorithm the explanation says that we have O(2^N)
leaf nodes and me looking at the diagram doesn’t really add up.
The example is for N= 3
and which would mean 8
leaf nodes but in reality we only have 5
.
Could someone please clear this out for me.
Type your question above this line.
Course: https://www.educative.io/collection/5668639101419520/5671464854355968
Lesson: https://www.educative.io/collection/page/5668639101419520/5671464854355968/5753264117121024