Quiz4.sp10

Quiz4.sp10 - Signature _ Student ID _ Name_ Score: Quiz 4...

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Quiz4.sp10 - Signature _ Student ID _ Name_ Score: Quiz 4...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online