Consider The Following Algorithm L Is A List And N Is Its Length For The Purpose

Considerthefollowingalgorithm

//Lisalistandnisitslength

// Forthepurposeofthisassignmentweassumethatn=4**k,fork≥1

// Alg1(L,n)

removethesmallestandlargestelement fromL

if n-2 >(4**k)/2

call Alg1(L, n-2)

a) Whatisthealgorithmintendedtodo?

b) Isitcorrect? Ifitisnotcorrectdiscovertheerror(s)whentryingtoprove correctnessandfixit(them). Then,reprovethecorrectness.

c) Whatisitstimecomplexity?

d) Canitbeimproved? Youmayuseanyalgorithmdiscussedinclass.

Posted in Uncategorized

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount