Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Data Structure Exam 2 Multiple choice Questions Solved Correctly To Score A+ 2025

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
30-07-2025
Written in
2024/2025

Data Structure Exam 2 Multiple choice Questions Solved Correctly To Score A+ 2025

Institution
Data Structures
Course
Data Structures

Content preview

Data Structure Exam 2 Multiple choice
Questions Solved Correctly To Score
A+ 2025
What is an external sorting algorithm? CORRECT ANSWERS Algorithm that uses tape
or disk during the sort

What is an internal sorting algorithm? CORRECT ANSWERS Algorithm that uses main
memory during the sort

What is the advantage of bubble sort over other sorting techniques? CORRECT
ANSWERS Detects whether the input is already sorted

The given array is arr = {1,2,4,3}. Bubble sort is used to sort the array elements. How
many iterations will be done to sort the array? CORRECT ANSWERS 4

What is an in-place sorting algorithm? CORRECT ANSWERS It needs O(1) or O(logn)
memory to create auxiliary locations

In the following scenarios, when will you use selection sort? CORRECT ANSWERS
Large values need to be sorted with small keys

What is the advantage of selection sort over other sorting techniques? CORRECT
ANSWERS It requires no additional storage space

What is the disadvantage of selection sort? CORRECT ANSWERS It is not scalable

The given array is arr = {3,4,5,2,1}. The number of iterations in bubble sort and
selection sort respectively are, CORRECT ANSWERS 5 and 4

The given array is arr = {1,2,3,4,5}. (bubble sort is implemented with a flag variable).
The number of iterations in selection sort and bubble sort respectively are, CORRECT
ANSWERS 4 and 1

Consider an array of elements arr[5]= {5,4,3,2,1} , what are the steps of insertions done
while doing insertion sort in the array. CORRECT ANSWERS (A) 4 5 3 2 1
34521
23451
12345

What are the correct intermediate steps of the following data set when it is being sorted
with the Insertion sort?15,20,10,18 CORRECT ANSWERS A. 15,20,10,18 --
10,15,20,18 -- 10,15,18,20 -- 10,15,18,20

, Consider the following lists of partially sorted numbers. The double bars represent the
sort marker. How many comparisons and swaps are needed to sort the next number. [1
3 4 8 9 || 5 CORRECT ANSWERS B. 3 comparisons, 2 swaps

Consider the following lists of partially sorted numbers. The double bars represent the
sort marker. How many comparisons and swaps are needed to sort the next number. [1
3 4 5 8 9 || 2] CORRECT ANSWERS C. 6 comparisons, 5 swaps

What operation does the Insertion Sort use to move numbers from the unsorted section
to the sorted section of the list? CORRECT ANSWERS Swapping

Searching and sorting algorithms are best implemented with which data structure?
CORRECT ANSWERS A. An array-based list
B. A linked list

What is the key used in a search algorithm? CORRECT ANSWERS Used in operations
such as searching, sorting, inserting and deleting

Which search algorithm is best for a large list? CORRECT ANSWERS Binary search

A binary search algorithm can be best described as what? CORRECT ANSWERS A
divide and conquer technique

On average, a sequential search algorithm would make N/2 number of comparisons for
a list of size N. CORRECT ANSWERS True

The following best describes which algorithm? The elements are compared and
swapped if the first is found to be greater than the second. CORRECT ANSWERS
Bubble sorting algorithm

The purpose of the bubble sorting algorithm is what? CORRECT ANSWERS A. To
speed up the search of an item in the list
B. To sort the contents of the list

A selection sort algorithm sorts the list by which method? CORRECT ANSWERS
Finding the smallest element in the list and moving this to the beginning of the unsorted
list

The insertion sort algorithm improves on the selection sort method by reducing the
number of comparisons. CORRECT ANSWERS True

The quick sort algorithm divides the list into two sub lists, then sorts each sub lists, and
then combines both sub lists. CORRECT ANSWERS True

Written for

Institution
Data Structures
Course
Data Structures

Document information

Uploaded on
July 30, 2025
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$13.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ElevatedExcellence Exam
Follow You need to be logged in order to follow users or courses
Sold
924
Member since
3 year
Number of followers
504
Documents
18336
Last sold
1 day ago
GETSOCIO EDUCATION

We have launched our assignments at a very reasonable price so that every student can enjoy its features. Our new method is gathering quite a positive feedback from the students, and many of our alumnus are fully satisfied with it. We would be glad if you purchase from us. THANK YOU!!

3.8

175 reviews

5
79
4
36
3
29
2
10
1
21

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions