First time here? Checkout the FAQ!
0 votes
Stack space used in binary search resursive implementation.
asked in Algorithms by Boss (6.1k points)   | 203 views
yes O(logn) recursion call stack space .
If we consider the tail recursion then?
then also , computer think that he have to do some work after function call retuen . so yes he take O(logn) space .

do iterative then O(1).
Ok... if in this case we want to minimise the stack space then is it possible in the recursive case ?
See recursive means we have to wait till function call return and call to another function so 1st call have to wait for last call . so no space not minimized . as i think

1 Answer

+2 votes
In case of recursive implementation, O(Logn) recursion call stack space.
answered by Active (1.4k points)  

Top Users Sep 2017
  1. Habibkhan

    8796 Points

  2. rishu_darkshadow

    3572 Points

  3. Warrior

    2914 Points

  4. Arjun

    2840 Points

  5. A_i_$_h

    2550 Points

  6. manu00x

    2268 Points

  7. nikunj

    1990 Points

  8. Bikram

    1874 Points

  9. makhdoom ghaya

    1820 Points

  10. SiddharthMahapatra

    1718 Points

26,346 questions
33,928 answers
31,231 users