Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 10 (a) You have a list of 1024 sorted numbers and are looking for a particular value. It takes one time unit to compare

image text in transcribed

Question 10 (a) You have a list of 1024 sorted numbers and are looking for a particular value. It takes one time unit to compare each number to see if it's the one you want. i. If we searching exhaustively across the list and the number we are looking for isn't there, how long will it take to work out that the number isn't there? You may assume that any operations other than comparison take up negligible time. [2 marks] ii. If we used binary search, how long would it take us, at most, to determine that the number wasn't there. You may assume that any operations other than comparison take up negligible time. [2 marks] (b) Provide the pseudo code algorithm for selection sort using a single array. [6 marks]

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_2

Step: 3

blur-text-image_3

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

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions

Question

Define the term "Leasing"

Answered: 1 week ago

Question

What do you mean by Dividend ?

Answered: 1 week ago

Question

What is database?

Answered: 1 week ago

Question

What are Mergers ?

Answered: 1 week ago

Question

8. Providing support during instruction.

Answered: 1 week ago