Start learning 50% faster. Sign in now
Get Started with ixamBee
Start learning 50% faster. Sign in nowRecursion involves a function calling itself until a base condition is met. Each recursive call creates a new stack frame, leading to memory usage that grows with the depth of recursion. Iteration, on the other hand, uses loops and does not involve stack frame creation, making it more memory-efficient in many cases. Why Other Options Are Incorrect: 1. Recursion uses loops for repetition, whereas iteration does not: This statement reverses the roles. Recursion relies on function calls for repetition, while iteration explicitly uses loops (for, while). 2. Iteration cannot solve problems that recursion can solve: Iteration can replicate recursion's functionality by using stacks or queues explicitly. Recursion is often a stylistic or practical choice, not a limitation of iteration. 3. Recursion is always faster than iteration: Recursion can sometimes be slower due to stack overhead and repeated function calls. Tail-call optimization can mitigate this in some languages, but generally, iteration is faster for equivalent tasks. 4. Recursion does not require a base case, while iteration requires a condition: Recursion must have a base case to terminate; otherwise, it leads to infinite calls. Iteration, too, requires a stopping condition, such as a loop exit condition.
The oldest method of controlling weed is _________.
What is the limit of Total Polar Compounds (TPC) in Used cooking Oil?
Health is defined as a state of complete physical, mental and social well-being and not merely the absence of disease or infirmity by:
Hen required how much sq/ft as per NABARD norms?
Which protein is responsible for elasticity of wheat dough?
Which crop is commonly referred to as the "Camel Crop" due to its remarkable ability to endure prolonged drought conditions?
To supplement the financial needs of farmers in procuring various inputs to ensure proper crop health and appropriate yields, PM Kisan scheme was launch...
The statistical design used when fertility gradient of soil is in one direction is
Weeds which are very short lived by nature are called:
Which of the following assets, the insurance cannot be covered?