An alternative approach to recursive fibonacci sequences
暂无分享,去创建一个
Generating a tera of a Fibonacci sequence is often discussed in introductory programming courses as an example where the recursive form has a very desirable simple beauty, but where the price of recursion is too high in terms of time and space. By generalizing to any Fibonacci sequence, another recursive formula can be used that saintains simple for a and understanding and yet is fast and requires reasonable resources.