Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRobert Tyree
370 PointsLogarithmic space referred to as logarithmic time?
Around 5:02 "Because of this, we say that the recursive version of the binary search algorithm runs in logarithmic time with a big O of log N."
Should this be "runs in logarithmic space"?
I think that's what the example is illustrating.
2 Answers
Jordan Kittle
Full Stack JavaScript Techdegree Graduate 20,148 PointsI also noticed this. I think it should have been talking about space complexity too. The subject he was talking about was space complexity and the video was showing extra memory requirements at the time.
Victor Mercier
14,667 PointsHi, as you noticed and learned the time complexity for a recursive binary search is O(log(n)) and its space complexity is also O(log(n)), because you will have to keep log(n) times right, left and array in the computer memory.
Hope this helped!
Paul Brubaker
14,290 PointsPaul Brubaker
14,290 PointsI think he just misspoke, but yeah I noticed the same thing.