Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

01: how many elements in the array? How many iterations? Where to store the min/max value? Stack (Array Implementation) Push Pop Clear Stack Searching the

image text in transcribed

image text in transcribed

image text in transcribed

01: how many elements in the array? How many iterations? Where to store the min/max value? Stack (Array Implementation) Push Pop Clear Stack Searching the minimum Searching the maximum This animation shous now to Ina tne minmum in an aray. in ne beginning we copy the irst of the amay e minimum. Nexx, we compare the minum wim every other element in the amay rany of ne companed element in the amay is smaler than the minimum we copy it o me minimum This anmaon shows e 10 find the aximum in an array. Inthe beginning, we copy the frst element af the aray to the maximum. Next,we compare he maximum wh every oer eement in the amay If any af the compared element in the amay is bigger than the maximum, we copy tto the maximum nin-0) nax -a(01 FOR i-1to 6 nax -a1] Speed of animetion Spaed af animation: Reset Play Play Q2: what searching method both use, Linear searching or binary searching? Mirroring the array This 5.mple animation 5hows how to mirror the elements in n rray Speed of animation Q3: Whatthis program does? Where the original a1] goes to? Linear search Linear search Visuaizationof the inear search aigotm visualzation of the inear search agctm. 20 20 18 18 16 13 Kay 1 is at indax Cick Reset to start over Key in double) Step |Reset Key in double); Average rating: Q4: How many comparisons the linear search needs to find the a[16]? Linear search Visualization of the linear search algorithm. 19 14 13 Alert Key 18 is at index 17 Click Reset to start over OK 2 35 6 79 Key (in double) tep Reset Average rating t's totalily freet Reg Q5: How many comparisons the binary search needs to find the a[16]? To list what index it has visited and compared Binary search Binary search visuaization of the binary search algorthm. The algorthm searches for agven number in a soned list. Flrst we compare the miodle element of Test with re searched number Next, in every step, we compare the middle element of the remaining part cf the list with the searched number Visuaizaton of the bnary search algomhm The algonthn searches tor a gven numberin a sorted lst Finstwe compane the midde element of he ist wth the searchbr Next in every ep. we compare ne mide eement af the remaining pat ofe istihe seerched umter. Cld Reset to OK Key (imdouble) ey lin daublk): Q6: what is the merging process? When to stop? Merging two sorted lists Merging two sorted lists suaisaton or merging wo sated ists Msualisation of merging two sorted Ists. cumen 323022-9259252 S1 28 28 5 8 181 6110 12 13 336363909 S1 28 128 5T 80 81 81 198 t 10 12 13 38 63 63 190 93 temp 10 12 13828563 63 15 80 81095 The iss are now merged Avarage retirg: - Average rabing

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

Compare and contrast monochronic and polychronic time orientations

Answered: 1 week ago