On this video I'm going show you the importance to the choice algorithm and give an example of how a simple change on source code can make an algorithm behaves completely different.
For the example I made change on the PHP code to make it run faster than unmodified C++ code, while still maintaining its recursion.
I use Fibonacci number sequence as it is popular, short, easily understandable and natively recursive.
Final note, the C++ code, on the other hand can be optimised in a similar way to the PHP code and achieve a much better performance than the PHP code.
Watch the video : https://www.youtube.com/watch?v=CMyvaGU1HmU