PHP Puzzles:
Calculating Fibonacci Sequences

By Sherri Wheeler

Each installment of PHP Puzzles presents a small coding exercise typical of those we might encounter in a job interview, or on a coding challenge website. In the following month, we’ll look at a couple of possible solutions for today’s puzzle. In our last issue, we solved the very common Factorial math problem to get ourselves warmed up. We looked at an iterative and a recursive solution. I then ask readers to solve the similar Fibonacci problem.

This article was originally published in the June 2020 issue of php[architect] magazine. To read the complete article please subscribe or purchase the complete issue.

Leave a comment

Use the form below to leave a comment: