need java coder fast

Completed Posted 7 years ago Paid on delivery
Completed

The Fibonacci number sequence is set up so that it starts with the numbers 1 and 1, and every number after that is the sum of its two immediate predecessors. Therefore, the sequence is: 1,1,2,3,5,8,13, . . .

The sequence is said to occur in various stages of nature, for example in counting the number of ancestors of a male bee, in the spacing of planets, in the arrangement of leaves on many plant stems, and in other applications.

After getting the users input, but before starting any calculations, determine what time the algorithm is started (in Java, use method [url removed, login to view]() to get the current number of milliseconds since 1970; in C# you can use [url removed, login to view]() to get the current DateTime object). Print this value. You’ll call the same method after the calculation is completed, and print that value, as well as the duration (end time minus the start time in Java gives you duration in milliseconds; in C# subtracting the two DateTime objects gives you a TimeSpan object which has a TotalMilliseconds property, giving you the time difference).

Part I

Code the Java program to use a recursive algorithm to compute the Nth Fibonacci term for a user. For example, note that the 5th number in the sequence can be computed based on the 3rd number and the 4th number. Each number should be computed recursively, down until any base case(s).

Part II

Code the Java program to use an iterative loop, rather than recursion. This should start with the first two numbers and calculate forward until the desired index is reached.

Part III

Test out both programs with the following inputs: 5, 10, 50, 100, 500, 1000 (if you don’t get a result in roughly one minute, stop the program rather than waiting for it to complete). What durations are displayed?

Next, for each program, find the smallest input N that will produce over 2 ms of duration.

C Programming C++ Programming Engineering Java JavaScript

Project ID: #12911937

About the project

4 proposals Remote project Active 7 years ago

Awarded to:

sabeshkumar

I'm a Java developer. I can do this. Please try my out. would be a wonderful opportunity to showcase my talent. Thanks

₹100 INR / hour
(0 Reviews)
0.0

4 freelancers are bidding on average ₹216/hour for this job

Meccano7

A proposal has not yet been provided

₹100 INR / hour
(6 Reviews)
1.9