0 0 votes Identify the false statement a. When a module calls a subroutine recursively ,in each call , all of the information is popped in the same order when sub routines are terminated one after another and finally the control is returned to the calling module b. A recursion algorithm has two elements: each call either solves only part of the problem or it reduces the size of the problem Algorithms recursion algorithms + – gshivam63 1.6k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
2 2 votes I think the option A is false . and second one is right . The first statement is false because all the calls are pushed in the same order while the popping is done in the reverse order . so the option a will be wrong . and statement b can be right about the recursion because yes the recursive algorithms either decrease the size or solve it completely. Tendua answered May 31, 2016 Tendua comment Share Follow See all 3 Comments 3 3 Comments reply Digvijay Pandey commented May 31, 2016 reply Follow flag & what about stack overflow ?? Neither it will reduce size nor solve it completely. "Either it will solve completely or it will reduce size" is property of Devide & Conquer. 0 0 replyShare ManojK commented May 31, 2016 i edited by ManojK May 31, 2016 reply Follow flag @Digvijay What is meaning of size of the problem here ? Is it size of program or space taken by recursive procedure? 0 0 replyShare Tendua commented Jun 3, 2016 reply Follow flag i think as stated algorithm not a program . stack overflow will not be the case . in such a situation. @digvijay 0 0 replyShare Please log in or register to add a comment.
0 0 votes When a module calls a subroutine recursively ,in each call , all of the information is popped in the same order when sub routines are terminated one after another and finally the control is returned to the calling module This is false .. But the second statement A recursion algorithm has two elements: each call either solves only part of the problem or it reduces the size of the problem is not correct. Using recursion increases the size is program.It takes extra stack space. ManojK answered May 31, 2016 • edited May 31, 2016 by ManojK ManojK comment Share Follow See 1 comment 1 1 comment reply gshivam63 commented May 31, 2016 reply Follow flag Why it takes O(log n) extra space and not O(n)? 0 0 replyShare Please log in or register to add a comment.