ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Operating Systems  >>  Data Structures
 
 


 

 
 Windows interview questions  Windows Interview Questions
 Linux interview questions  Linux Interview Questions
 Unix interview questions  Unix Interview Questions
 Solaris interview questions  Solaris Interview Questions
 RTOS interview questions  RTOS Interview Questions
 Bulnex interview questions  Bulnex Interview Questions
 Operating Systems General Concepts interview questions  Operating Systems General Concepts Interview Questions
 Data Structures interview questions  Data Structures Interview Questions
 Operating Systems AllOther interview questions  Operating Systems AllOther Interview Questions
Question
What do you mean by Base case, Recursive case, Binding Time,
Run-Time Stack and Tail Recursion?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What do you mean by Base case, Recursive case, Binding Time, Run-Time Stack and Tail Recursion?
Answer
# 1
These terms are found in Recursion.
1.Base Case:it is the case in recursion where the answer is 
known,or we can say the termination condition for a 
recursion to unwind back.
For example to find Factorial of num using recursion:

int Fact(int num){

if(num==1 || num==0)//base case
return 1;
else                // recursive case: 
return num*Fact(num-1);
}

2.Recursive case:It is the case whcih brings us to the 
closer answer.

Run Time Stack:It is a system stack us to save the frame 
stack of a function every recursion or every call.
This frame stack consists of the return address,local 
variables and return value if any.

Tail Recursion:The case where the function consist of 
single recursive call and it is the last statement to be 
executed.A tail Recursion can be replace by iteration.  
The above funtion consists of tail recursion case.
where as the below function does not.

void binary(int start,int end,int el){
int mid;
if(end>start){
mid=(start+end)/2;
if(el==ar[mid])
return mid;
else{
if(el>ar[mid])
binary(mid+1,end,ele);
else
binary(start,mid-11,ele);
}
}
}
 
Is This Answer Correct ?    1 Yes 0 No
Wonder Surong
 

 
 
 
Other Data Structures Interview Questions
 
  Question Asked @ Answers
 
Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements. Syntel9
What is binary tree? BMC5
sir plz. send me a bunch of questions related to this topic which may help me in campus selection ABC1
What do you mean by: Syntax Error, Logical Error, Runtime Error?  2
A list is ordered from smaller to largest when a sort is called. Which sort would take the longest time to execute?  4
What are the parts of root node? BMC2
Explain binary searching, Fibinocci search. IBM1
Which data structure is needed to convert infix notations to post fix notations? Fidelity8
What do you mean by Base case, Recursive case, Binding Time, Run-Time Stack and Tail Recursion? TCS1
What is the maximum total number of nodes in a tree that has N levels? Note that the root is level (zero) Sasken10
What is a data structure? Keane-India-Ltd3
The element being searched for is not found in an array of 100 elements. What is the average number of comparisons needed in a sequential search to determine that the element is not there, if the elements are completely unordered? Morgan-Stanley7
Evaluate the following prefix expression " ++ 26 + - 1324" Patni8
What does abstract data type means? TCS6
Write a Binary Search program  2
Stack can be described as a pointer. Explain. Wipro1
What is B+ tree? BMC3
What is the average number of comparisons needed in a sequential search to determine the position of an element in an array of 100 elements, if the elements are ordered from largest to smallest? ABB10
How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3? iGate9
Convert the following infix expression to post fix notation ((a+2)*(b+4)) -1  7
 
For more Data Structures Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com