Blog Posts tagged with 'recursion'

Fibonacci Numbers - Tale of Two Algorithms using Python

A mind blowing experiment looking at two different algorithms in Python for calculating Fibonacci numbers. One is the well-known recursive function, and the other is an alternative algorithm using a list. I profiled these functions in Pycharm, and am amazed at the results!

Read More

Python Algorithms - Revisiting Recursive Functions and Palindromes

My algorithms course has me re-thinking that recursive function used to detect palindromes. Although the assignment required writing a recursive function, is a recursive function really the best algorithm? Possibly, but there is at least one other good solution.

Read More

Python Recursive Function to Detect Palindromes

I wrote a recursive function in Python to determine if a string was a palindrome. While doing so I also wrote one of my first Python List Comprehensions to strip non-alphanumeric characters from the string before testing to see if it was a palindrome.

Read More