Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

495 Multiple Choice 1. Which algorithm requires time directly proportional to the size of the in- a) linear search b) binary search c) merge sort

image text in transcribed
image text in transcribed
495 Multiple Choice 1. Which algorithm requires time directly proportional to the size of the in- a) linear search b) binary search c) merge sort put? d) selection sort 2. Approximately how many iterations will binary search need to find a value in a list of 512 items? a) 512 b) 256 c) d) 3 3. Recursions on sequences often use this as a base case; a) b) 1 C) an empty sequence d) None 4. An infinite recursion will result in a) a program that "hangs" b) a broken computer c) a reboot d) a run-time exception 5. The recursive Fibonacci function is inefficient because a) it does many repeated computations b) recursion is inherently inefficient compared to iteration c) calculating Fibonacci numbers is intractable d) fibbing is morally wrong 6. Which is a quadratic time algorithm? a) linear search b) binary search c) Tower of Hanoi d) selection sort 7. The process of combining two sorted sequences is called a) sorting b) shuffling c) dovetailing d) merging 8. Recursion is related to the mathematical technique called a) looping b) sequencing c) induction d) contradiction 9. How of size 5? many steps would be needed to solve the Tower of Hanoi for a tower a) 5 b) 10 c) 25 d) 31 10. Which of the following is not true of the halting problem? a) It was studied by Alan Turing. b) It is harder than intractable. c) Someday a clever algorithm may be found to solve it. d) It involves a program that analyzes other programs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamental Financial Accounting Concepts Paperback By Edmonds Thomas P O

Authors: Thomas P. Edmonds, Christopher Edmonds, Mark A. Edmonds, Jennifer Edmonds, Philip R. Olds

11th Edition

9781264266234, 1264266235

More Books

Students also viewed these Accounting questions

Question

8-6 Who poses the biggest security threat: insiders or outsiders?

Answered: 1 week ago