Palindrom and check for only lowercase letters
Collapse
X
-
Sorry w4c, I didn't see your post before I removed the code. Usually we do not allow code in any question that can be commonly found in programming assignments. So, even if the user needs a recursive solution and someone posts an iterative solution we still do not allow it because if 3rd user comes in and searches for "palindrome " they will have an iterative solution.Originally posted by weaknessforcatsYes, you should not be posting code but since the OP needs a recursive function and your solution does not use one, I have let the code stand.
OPs, I encourage you to post code snippets of critical areas of your code that you are questioning the logic in or wondering why it does not work. Generally posting code snippets will not get your code deleted, whereas posting entire code files will.Leave a comment:
-
Yes, you should not be posting code but since the OP needs a recursive function and your solution does not use one, I have let the code stand.Leave a comment:
-
I know that we're not supposed to post code if they have no coding but I'm doing an exercise which starts with checking if the word's a palindrom.
My coding works but I was wondering if there's a more effective way.
For the ts: my reasoning for this solution was this:
-for a palindrom the first and last letter, second and the letter before the last, ... must be the same.
-a string is an array of characters so I could just compare them.
And for the lower case take a look at the cctype library it contains the function you need for the lowercase ;)Code:Sorry friend...
Last edited by RedSon; Feb 25 '08, 03:58 PM.Leave a comment:
-
Palindrom and check for only lowercase letters
Hi!
can anyone help me with this task?
im creating a palindrom :
write a recursic function whitch takes a stringobject(wh o only contains small letters and numbers) and checks if its a palindrom..Tags: None
Leave a comment: