1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lions [1.4K]
3 years ago
13

What are the advantages and disadvantages of solving a problem that can be broken down into repetitive tasks with recursion as o

pposed to a loop? Explain your answer.
Computers and Technology
1 answer:
lesantik [10]3 years ago
3 0

Answer:

Answered below

Explanation:

Recursion refers to the process of a function calling itself within its own definition. It calls itself repeatedly until a base condition is met and the loop breaks.

The advantages of recursion over loops include;

A) Recursion reduces time complexity.

B) Recursion is better at tree traversal and graphs.

C) Recursion reduces the time needed to write and debug code and also adds clarity to code.

Disadvantages of recursion include;

A) Recursion uses more memory because each function call remains in stack until the base case is met.

B) Recursion can be slow.

C) Recursion

You might be interested in
"if" statements are part of creating computer programs, what are these instructions called and how would you use them?
podryga [215]

Answer:

if means that like (if this happen it will come or not come answer)

Explanation:

sorry I don't know how to tell but plz reply if you understand or not.

7 0
2 years ago
Read 2 more answers
Assume that x is a double variable that has been initialized. Write a statement that prints it out, guaranteed to have a decimal
Feliz [49]

Answer:

cout <<showpoint << x; is  the statement which  prints the decimal point,        but without forcing scientific.

Explanation:

The showpoint function in c++ print the decimal point number without forcing scientific.The showpoint function set  the showpoint format flag for the str stream in c++.

Following are the program in c++

#include<iostream> //header file

using namespace std; // namespace

int main() // main function

{

   double x=90.67; // double variable

   cout <<showpoint << x; // display x  without forcing scientific

  return 0;

}

Output

90.6700

6 0
3 years ago
Demographics and psychographics influence database marketing.<br><br><br> False<br><br> True
Kamila [148]

Answer:

true is the correct answer

5 0
2 years ago
As an experienced networking professional, you are asked to conduct a posture assessment on a local credit union’s network. The
ale4655 [162]

Answer:1987

Explanation:guess

8 0
3 years ago
Employees are one of the main contributors to cybersecurity breaches because of _____? Select 3 options.
Tema [17]

Answer: inattention, lack of knowledge, and negligence.

Explanation: employees are often the cause of workplace incidents because they may be unknowledgeable about security protocols, negligent, or simply make a mistake.

5 0
3 years ago
Other questions:
  • Energy from sources that can be regenerated or reused is called what?
    12·1 answer
  • How does adding additional light bulbs affect a series circuit?
    10·1 answer
  • We never need to use a forward declaration when invoking a public subprogram. true or false?
    15·1 answer
  • George and Miguel want to know more about their local and online competitors and about the retail industry. What is the best way
    9·1 answer
  • How to select the entire table in microsoft excel
    11·1 answer
  • Drag the correct type of update to its definition.
    14·1 answer
  • A software update is also referred to as what?
    15·2 answers
  • You would like to narrow your search on this topic.
    15·2 answers
  • Write a flowchart and C code for a program that does the following: Uses a do...while loop. Prints the numbers from 1 to 10 with
    13·1 answer
  • What is the most common knowledge computer programmers need in order
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!