please do in Haskal programing and explain how it is done ?

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 8SA
icon
Related questions
Question

please do in Haskal programing and explain how it is done ?

Assignment 4:
Take a look at the mysterious function f4 in the file. Try it out with the following
input:
> f4 (sent "3 6 7 10 20 23") (sent "10 6 23")
> f4 (sent "3 6 7 10 20 23") (sent "10 6 11 23")
This function uses f2 (perhaps several times). What is the maximum number of times
that f2 will be called. If the two sentences are roughly the same size, n, what would
be the order of growth described in terms of n of f4 for its worst case given what we
know about the order of growth of f2?
Criteria for Success: You have explained how you determined the order of growth
of f4.
Transcribed Image Text:Assignment 4: Take a look at the mysterious function f4 in the file. Try it out with the following input: > f4 (sent "3 6 7 10 20 23") (sent "10 6 23") > f4 (sent "3 6 7 10 20 23") (sent "10 6 11 23") This function uses f2 (perhaps several times). What is the maximum number of times that f2 will be called. If the two sentences are roughly the same size, n, what would be the order of growth described in terms of n of f4 for its worst case given what we know about the order of growth of f2? Criteria for Success: You have explained how you determined the order of growth of f4.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning