Question

How does recursion help solve problems? What are the two primary cases when implementing a recursive...

How does recursion help solve problems? What are the two primary cases when implementing a recursive method? Java

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please upvote if you are able to understand this and if there is any qeury do mnetion it in the comment section.

Recursion can help in solving problems as:

Recursion takes place in program when a function calls itself. Recursion solves a problem by breaking that problem into smaller subparts which are meaningful and that program or problem is broken till there is the smallest problem which is smaller enough to be solved easily.

Two cases while implementing a recursive method are as follows:

  1. Base case - This is the smallest subpart of the problem which is easily solvable and that cannot be divided further.
  2. Recursive case - This is the part which can be divided into smaller and smaller parts.
Add a comment
Know the answer?
Add Answer to:
How does recursion help solve problems? What are the two primary cases when implementing a recursive...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT