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
Which of the following is the fastest way to open an Access database? a. Right-click the database icon. b. Start Access from the
STALIN [3.7K]

Answer:

C. Double-click the database icon.

5 0
3 years ago
Read 2 more answers
Courts are struggling with the privacy implications of GPStracking. In 2009, New York’s highest court held that policeofficers m
aniked [119]

Answer:

warrant

Explanation:

New York State's highest court ruled in 2009 that tracking a person via the global positioning system (GPS) without a warrant violated his right to privacy.

6 0
3 years ago
Write a function that checks whether two words are anagrams. Two words are anagrams if they contain the same letters. For exampl
Masteriza [31]

Answer:

def isAnagram(s1, s2):

   list1=s1

   list2=s2

   sortedlist1 = sorted(list1)

   sortedlist2 = sorted(list2)

   if sortedlist1 == sortedlist2:

       print(list1+ " and "+list2+ " are anagram")

   else:

       print(list1+ " and "+list2+ " are not anagram")

Explanation:

Here is a call to the function isAnagram():

list1 =input("Enter String1 ")

list1 =input("Enter String2 ")

isAnagram(list1,list2)

Attached is the run and output for this program

4 0
3 years ago
An online retailer has developed an algorithm to provide personalized recommendations to shoppers. Which form of IPR protects th
Helen [10]

Answer:

should be B.

Explanation:

If not then Im sorry

5 0
2 years ago
Communication among office computers is based on a protocol that uses CRC-32 for error detection. A series of 100 identical test
Fiesta28 [93]
I think it is the CRC-32 for error detection
4 0
2 years ago
Other questions:
  • Analog signals consists of individual electric pulses that represents bits group together into bytes {True/False}
    13·1 answer
  • Wich technology can a website use to allow you to listen to a concert live over the internet?
    10·1 answer
  • What feature of a word processing program helps you to easily check and correct spelling mistakes?
    9·1 answer
  • The font color grid is located in the color group on the design tab. (points : 2) true false
    9·1 answer
  • Which of the following conditions will maximize the amount of interest you earn
    5·1 answer
  • Add a new row to a table by clicking in the
    10·1 answer
  • What is your personal definition of life? How do you appreciate life?​
    10·1 answer
  • Note that common tasks are listed toward the top, and less common tasks are listed toward the bottom. According to O*NET, what a
    14·1 answer
  • Prior to the 1996 NEC, ____ receptacles and cords were permitted. However, now it is mandatory that a separate equipment groundi
    11·1 answer
  • question 2 which data link layer protocol defines the process by which lan devices interface with upper network layer protocols?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!