Class FibonacciAlgorithm

java.lang.Object
topics.parallel.FibonacciAlgorithm

public class FibonacciAlgorithm extends Object
To solve the classical Fibonacci algorithm using a recursive and inefficient algorithm
Author:
vicegd
  • Field Details

    • n

      public int n
  • Constructor Details

    • FibonacciAlgorithm

      public FibonacciAlgorithm(int n)
      Constructor
      Parameters:
      n - The number to calculate the result
  • Method Details

    • solve

      public long solve()
      Initializes the process calling the recursive method
      Returns:
      The Fibonacci results for the value of n