- Prof. Dancy's Site - Course Site -
Palindromes are words or numbers that are spelled the same both forwards and backwards. There are a number of often seen and famous palindromes:
Ewe
Anna
Racecar
A man a plan a canal Panama
Taco cat
Your job is to develop an algorithm (and accompanying code) to determine whether a string
is or is not a palindrome.
You also will have to analyze the runtime of your algorithm/code after you've completed the task.
Stack
Queue
"string".index("s")
) OR the indexing operator ("string"[0]
).
queue
and 1 stack
)*The original version of this assignment was developed by Lea Wittie @ Bucknell University.