WGUl C949l Finall Examl (Latestl 2026l
Update)l Datal Structuresl andl Algorithmsl
Il Review|l 100%l Verifiedl Questionsl &l
Answersl |l Gradel A
Q:l Whatl arel thel threel mainl asymptoticl notationsl inl asymptoticl analysis,l andl whatl dol
theyl calculate?
Answer:
Bigl Ol Notationl -l worstl case
Omegal Notationl -l bestl case
Thetal Notationl -l averagel case
Q:l Whatl isl mergel sort'sl methodl andl timel complexity?
Answer:
Recursivelyl dividesl thel listl intol halvesl downl tol onel element,l thenl sortsl asl itl mergesl
them.l
O(nl logl n)l forl alll cases.
Q:l Whatl isl quickl sort'sl methodl andl timel complexity?
Answer:
Partitionsl al sectionl ofl thel unsortedl listl intol al leftl partl andl al rightl part,l basedl onl al
chosenl elementl withinl thel listl calledl thel pivot.
O(nl logl n)l average,l O(n^2)l worst
,Q:l Howl dol youl determinel thel midpointl forl quicksort?
Answer:
middlel valuel -l roundl downl ifl listl isl even
Q:l Whatl isl al heapl sort'sl methodl andl timel complexity?
Answer:
Usesl al heapl datal structurel tol repeatedlyl extractl thel maximuml (orl minimum)l elementl
andl rebuildsl thel heap
O(nl logl n)l alll cases
Q:l Whatl isl al radixl sort'sl methodl andl timel complexity?
Answer:
Placesl integersl intol bucketsl basedl onl thel leastl significantl digit'sl valuel thenl repeating
O(n)l inl alll cases
Q:l Whatl isl al selectionl sort'sl methodl andl timel complexity?
Answer:
Thel selectionl sortl algorithml searchesl thel unsortedl partl ofl thel arrayl forl thel smallestl
elementl andl swapsl itl tol thel sortedl part.
O(n^2)l inl alll cases
, Q:l Whatl isl al insertionl sort'sl methodl andl timel complexity?
Answer:
Takesl anl elementl froml thel unsortedl partl andl repeatedlyl swapsl withl thel elementl nextl tol
itl untill itl isl inl thel sortedl part.
O(n^2)l inl alll casesl apartl froml O(n)l ifl alreadyl sorted
Q:l Whatl isl al bubblel sort'sl methodl andl timel complexity?
Answer:
Iteratesl throughl al list,l comparingl andl swappingl adjacentl elements
O(n^2)l inl alll cases
Q:l Whatl isl al bucketl sort'sl methodl andl timel complexity?
Answer:
Distributesl elementsl intol bucketsl forl numericall valuesl inl al specificl rangel andl sortsl
eachl bucketl individually,l thenl concatenatesl bucketsl together
O(n^2)l worstl case,l O(n)l averagel case
Q:l Whatl isl al shelll sort'sl methodl andl timel complexity?
Answer:
Usesl gapl valuesl tol determinel numberl ofl interleavedl listsl thenl sortsl eachl listl
individuallyl withl al variantl ofl thel insertionl sort.l Itl finishesl byl performingl al standardl
insertionl sortl onl thel entirel array.
O(n^2)l worstl case,l O(n^1.5)l averagel case,l O(nl logl n)l bestl case
Update)l Datal Structuresl andl Algorithmsl
Il Review|l 100%l Verifiedl Questionsl &l
Answersl |l Gradel A
Q:l Whatl arel thel threel mainl asymptoticl notationsl inl asymptoticl analysis,l andl whatl dol
theyl calculate?
Answer:
Bigl Ol Notationl -l worstl case
Omegal Notationl -l bestl case
Thetal Notationl -l averagel case
Q:l Whatl isl mergel sort'sl methodl andl timel complexity?
Answer:
Recursivelyl dividesl thel listl intol halvesl downl tol onel element,l thenl sortsl asl itl mergesl
them.l
O(nl logl n)l forl alll cases.
Q:l Whatl isl quickl sort'sl methodl andl timel complexity?
Answer:
Partitionsl al sectionl ofl thel unsortedl listl intol al leftl partl andl al rightl part,l basedl onl al
chosenl elementl withinl thel listl calledl thel pivot.
O(nl logl n)l average,l O(n^2)l worst
,Q:l Howl dol youl determinel thel midpointl forl quicksort?
Answer:
middlel valuel -l roundl downl ifl listl isl even
Q:l Whatl isl al heapl sort'sl methodl andl timel complexity?
Answer:
Usesl al heapl datal structurel tol repeatedlyl extractl thel maximuml (orl minimum)l elementl
andl rebuildsl thel heap
O(nl logl n)l alll cases
Q:l Whatl isl al radixl sort'sl methodl andl timel complexity?
Answer:
Placesl integersl intol bucketsl basedl onl thel leastl significantl digit'sl valuel thenl repeating
O(n)l inl alll cases
Q:l Whatl isl al selectionl sort'sl methodl andl timel complexity?
Answer:
Thel selectionl sortl algorithml searchesl thel unsortedl partl ofl thel arrayl forl thel smallestl
elementl andl swapsl itl tol thel sortedl part.
O(n^2)l inl alll cases
, Q:l Whatl isl al insertionl sort'sl methodl andl timel complexity?
Answer:
Takesl anl elementl froml thel unsortedl partl andl repeatedlyl swapsl withl thel elementl nextl tol
itl untill itl isl inl thel sortedl part.
O(n^2)l inl alll casesl apartl froml O(n)l ifl alreadyl sorted
Q:l Whatl isl al bubblel sort'sl methodl andl timel complexity?
Answer:
Iteratesl throughl al list,l comparingl andl swappingl adjacentl elements
O(n^2)l inl alll cases
Q:l Whatl isl al bucketl sort'sl methodl andl timel complexity?
Answer:
Distributesl elementsl intol bucketsl forl numericall valuesl inl al specificl rangel andl sortsl
eachl bucketl individually,l thenl concatenatesl bucketsl together
O(n^2)l worstl case,l O(n)l averagel case
Q:l Whatl isl al shelll sort'sl methodl andl timel complexity?
Answer:
Usesl gapl valuesl tol determinel numberl ofl interleavedl listsl thenl sortsl eachl listl
individuallyl withl al variantl ofl thel insertionl sort.l Itl finishesl byl performingl al standardl
insertionl sortl onl thel entirel array.
O(n^2)l worstl case,l O(n^1.5)l averagel case,l O(nl logl n)l bestl case