Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C++ please 1. Recursion coding exercises (a) Use recursion to write a function isPal that returns true if the input string is a Palindrome,

Use C++ please

image text in transcribed

1. Recursion coding exercises (a) Use recursion to write a function isPal that returns true if the input string is a Palindrome, otherwise returns false. For example: isPal("ah212ha") return true. (b) Write a program called Catalan which takes one argument and calls a recursive function which computes the nth Catalan number and prints the result to the consol. They are defined by the following recursive formula forn 2 0 (with Co 1): For example, Catalan 4 would print out: 14, Catalan 10 would print out: 16796. The Catalan number form a sequence of natural numbers that occur in many counting problems. They are named after the mathematician Eugene Charles Catalan (see Wikipedia page)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions