Welcome! Log In Create A New Profile

Advanced

Assignment 02Q4

Posted by united 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Assignment 02Q4
May 01, 2007 09:26AM
Concerning the recursive function to find whether a word is a palindrome can anyone give me a tip. I am strugling with the question. What should the base case be in this question? I can't figure it out. Thanks for any help.
Re: Assignment 02Q4
May 02, 2007 08:39AM
Here's a tip:

The Base case would be different for each implementation of the recursive function, but a good method would be to check the first and last characters of the string to see if they're the same (this will be the general case), if they are, you reduce the amount of characters to test in the next call to the function.

Hope that helps
Re: Assignment 02Q4
May 02, 2007 03:45PM
Is the function not meant to return a true / false value since its boolean?
Re: Assignment 02Q4
May 02, 2007 07:36PM
yup!
Re: Assignment 02Q4
May 02, 2007 08:14PM
Thanks pal I will try it.
Sorry, only registered users may post in this forum.

Click here to login