0 votes 0 votes How the below code snippet is working when the function black(“213”) is called? Shadan Karim asked Dec 29, 2018 Shadan Karim 511 views answer comment Share Follow See all 12 Comments See all 12 12 Comments reply prashant jha 1 commented Dec 29, 2018 reply Follow Share Is the answer 3313312? 0 votes 0 votes Gupta731 commented Dec 29, 2018 reply Follow Share $3313312$ Draw the recursion tree and then check 1 votes 1 votes prashant jha 1 commented Dec 29, 2018 reply Follow Share Yes , correct. 0 votes 0 votes Shadan Karim commented Dec 29, 2018 reply Follow Share yes, explain 0 votes 0 votes Gupta731 commented Dec 29, 2018 reply Follow Share @prashant jha 1 can you please upload the recursion tree image. 0 votes 0 votes Shamim Ahmed commented Dec 29, 2018 i edited by Shamim Ahmed Dec 29, 2018 reply Follow Share I am confused with terminating condition. I think it should be if [ S = '\0' ] 0 votes 0 votes prashant jha 1 commented Dec 29, 2018 reply Follow Share When s[0] = '\0' then it is false , and negation of false is true. 0 votes 0 votes Gupta731 commented Dec 29, 2018 reply Follow Share I think it means if S[0] is empty then return 0 votes 0 votes prashant jha 1 commented Dec 29, 2018 reply Follow Share https://stackoverflow.com/questions/36950552/0-evaluates-false-0-evaluates-true 0 votes 0 votes Shamim Ahmed commented Dec 29, 2018 reply Follow Share Sorry.. Written mistakenly.. Edited 0 votes 0 votes Shamim Ahmed commented Dec 29, 2018 reply Follow Share Tell me one thing S[0] indicating the first index right? 0 votes 0 votes akshat sharma commented Dec 29, 2018 reply Follow Share answer will be 3313312 1 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes Same pattern repeated , if not understood i will post a better one :) prashant jha 1 answered Dec 29, 2018 prashant jha 1 comment Share Follow See all 0 reply Please log in or register to add a comment.