Computers and Technology
Computers and Technology, 18.10.2019 09:30, Haru3

(you need to have first completed programming project 13.1 to work on this project.) in this exercise, you will compare the efficiency of a recursive and an iterative function to compute the fibonacci number. a. examine the recursive function computation of fibonacci numbers. note that each fibonacci number is recomputed many times. to avoid this recomputation, do programming project 13.1 iteratively, rather than recursively; that is, do the problem with a loop. you should compute each fibonacci number once on the way to the number requested and discard the numbers when they are no longer needed. b. time the solution for programming project 13.1 and part a of this project in finding the 1st, 3rd, 5th, 7th , 9th, 11th, 13th , and 15th fibonacci numbers. determine how long each function takes. compare and comment on your results. hints: if you are running linux, you can use the bash time utility. it gives real time (as in wall clock time), user time (time measured by cpu cycles devoted to your program), and sys time (cpu cycles devoted to tasks other than your program). if you are running in some other environment, you will have to read your manual, or ask your instructor, in order to find out how to measure the time a program takes to run.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 07:30, jackie0833
Which option allows you to view slides on the full computer screen?
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, valeriegarcia12
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
image
Computers and Technology, 24.06.2019 00:30, sethhdoty
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. obfuscate: to make something so confusing that it is difficult to understand.
Answers: 2
image
Computers and Technology, 24.06.2019 09:50, ira51
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the web pages for a particular vendor (say amazon). a. how can you use this data to determine which are the best ads? b. how can you use this data to determine which are the best ad formats? c. how could you records of past ads and ad clicks to determine which ads to send to a given ip address? d. how could you use this data to determine how well the technique you used in your answer to part c was working? e. how could you use this data to determine that a given ip address is used by more than one person? f. how does having this data give you a competitive advantage vis-à-vis other ad-serving companies?
Answers: 2
Do you know the correct answer?
(you need to have first completed programming project 13.1 to work on this project.) in this exercis...

Questions in other subjects: