Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 5 Soalan 51 (a) Consider the following list of number. (Pertimbangkan senarai nombor berikut. [15,5,4,18,12,19,14,10,8,20] (C5,CO3,PO2) (i) Construct the trace of insertion sort to

image text in transcribed
Question 5 Soalan 51 (a) Consider the following list of number. (Pertimbangkan senarai nombor berikut. [15,5,4,18,12,19,14,10,8,20] (C5,CO3,PO2) (i) Construct the trace of insertion sort to rearrange the numbers into ascending order. (Bina jejak isihan penyisipan untuk menyusun nombor-nombor berkenaan ke dalam bentuk susunan menaik. (6 Marks/Markah) (C2,CO3,P01) (ii) Explain why insertion sort is a stable sort. (Jelaskan kenapa isihan penyisipan ialah isihan yang stabil.] (2 Marks/Markah) (C4,CO3,PO2) (iii) Analyse the best and average time complexity for insertion sort. (Analisa kompleksiti terbaik dan masa purata kompleksiti untuk isihan penyisipan.) (2 Marks/Markah) (b) Consider the following list of number. (Pertimbangkan senarai nombor berikut. L = [3,5,6,8,11,12,14,15,17,18] (C5,CO3,PO2) (i) Construct the trace of interpolation search to find the set of keys (14,20). (Bina jejak carian interpolasi untuk mencari satu ser kunci {14,20).] (6 Marks/Markah) (C2,CO3,PO1) (ii) Compare the interpolation search with the binary search. (Bandingkan carian interpolasi dengan carian penduaan. (2 Marks/Markah) (C4,CO3,PO2) (iii) Analyse the best and average time complexity for interpolation search. ( Analisa kompleksiti terbaik dan masa purata kompleksiti untuk carian interpolasi.) (2 Marks/Markah)

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

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions

Question

Perform an Internet search. Discuss a company that uses EPLI.

Answered: 1 week ago

Question

How do you feel about employment-at-will policies? Are they fair?

Answered: 1 week ago