1 votes 1 votes Why 2n is added as n-1 & n-2 functions has been called Algorithms recursion time-complexity + – twin_123 asked Nov 19, 2018 • retagged Jun 13, 2022 by makhdoom ghaya twin_123 380 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Shaik Masthan commented Nov 19, 2018 reply Follow Share 2n is added due to n prints 2 times... read R(n) carefully... 0 votes 0 votes Mayankprakash commented Nov 19, 2018 reply Follow Share @shaik Printf or if statement just take O(1) noe? So even if I print anything 100 times still it's O(1) then why it's 2n? Please help me in understanding 0 votes 0 votes Shaik Masthan commented Nov 19, 2018 reply Follow Share it is not asking time complexity... it is asking sum of output. 0 votes 0 votes Mayankprakash commented Nov 19, 2018 reply Follow Share Oh yea got it!!.. If it was time complexity then it would 1 instead of 2n ? 0 votes 0 votes Shaik Masthan commented Nov 19, 2018 reply Follow Share yes brother ! 1 votes 1 votes Mayankprakash commented Nov 19, 2018 reply Follow Share @shaik Thanks bro 0 votes 0 votes Please log in or register to add a comment.