Oktatás * Programozás 2 * Szkriptnyelvek * levelezősök Félévek Linkek * kalendárium |
EnPy /
20120815ePalindrome Write a function that decides about a string if it's a palindrome. A string is said to be palindrome if it reads the same backwards as forwards, e.g. madam. Solve the exercise in different ways: (1) Trivial method (in Python it's very easy to reverse a sequence). (2) Iterative method. You are not allowed to make a copy of the string. (3) Recursive method. Just to practice recursion too. |
Blogjaim, hobbi projektjeim * The Ubuntu Incident [ edit ] |