Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » Forum » x-Forum » Question

Iterative Function with JavaScript-CppBuzz-Forum

A function f is defined by the rule that f(n) = n if n < 3 and f(n) = f(n-1) + 2f(n-2) + 3f(n-3) if n >= 3.Write a JavaScript function that computes f by means of a recursive process.
Write a function that computes f by means of an iterative process.

Posted by Dtzr06 2020-11-08 09:11:24

No Ans Posted

Please login to comment

Log In


Ask New Question