Quiz4.sp10

# Quiz4.sp10 - Signature Student ID Name Score Quiz 4 CSE 21...

This preview shows pages 1–2. Sign up to view the full content.

Signature ______________________ Name_________________________ Student ID _____________________ Score: Quiz 4 CSE 21 Spring 2010 Which version (recursive or iterative or both) of Fib(n) will be more time and space efficient? _____ A) recursive B) iterative C) both are equal What is the main reason why? _____ A) recursive version is shorter B) recursive version implicitly uses the run time stack C) iterative version does not re-compute all the previously computed fib values D) iterative version uses looping E) recursive version takes advantage of one or two base case(s) F) iterative version calls the recursive version so they are equal G) both versions have the same big-Oh complexity H) both versions have the same recurrence relation and closed form solution What is arguably the most important precondition for the binary search algorithm? _____ A) the data is already ordered/sorted B) the key we are searching for is in the array C) the key we are searching for is even D) the number of data elements is even E) the number of data elements is odd F) the key we are searching for is odd

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern