2 votes 2 votes Algorithms algorithms dynamic-programming recurrence-relation numerical-answers test-series + – Supremo asked Jan 19, 2017 • retagged Jul 7, 2022 by Lakshman Bhaiya Supremo 462 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes Total number of unique subproblems= number of functional calls required = 13 plz make me correct if i m wrong... akash.dinkar12 answered Jun 3, 2017 akash.dinkar12 comment Share Follow See all 3 Comments See all 3 3 Comments reply Saikat commented Jul 5, 2017 reply Follow Share Answer should be 10. Your approach is correct but see in the question they are asking the number of function calls only when the stack is used. But for T(<=1) the values are already calculated. So T(1), T(0) and T(-1) we do not need to count. 1 votes 1 votes smsubham commented Feb 8, 2018 reply Follow Share Ya it should be 10. Also first condition in question should be if n < 1. Shouldn't it be? 0 votes 0 votes Mr.OOPs commented Feb 8, 2018 reply Follow Share Yes, Answer should be 10. @smsubham Yes, the condition must be n<1, I think its typos. isn't it? 0 votes 0 votes Please log in or register to add a comment.