100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

DATA STRUCTURE EXAM QUESTIONS AND ANSWERS

Rating
-
Sold
-
Pages
7
Grade
A+
Uploaded on
29-07-2025
Written in
2024/2025

DATA STRUCTURE EXAM QUESTIONS AND ANSWERS Algorithm Definition - Answer- A set of steps to accomplish a task... Algorithm according to Meriam-Webster Dictionary: a procedure for solving a mathematical problem (as of finding the greatest common divisor) in a finite number of steps that frequently involves repetition of an operation; broadly : a step-by-step procedure for solving a problem or accomplishing some end especially by a computer. What makes a good algorithm? - Answer- 1. correctness (solves a problem) 2. efficiency Asymptotic Analysis - Answer- Tells us that some algorithms are more efficient than others Merge Sort Big-O notation - Answer- (n log n) n = # of items log n= number of splits for that number of items ex. log2 8=3 8-#of items 3=number of splits for that amount of items Linear Search Big-O notation - Answer- O(n) because we must look at all n items from a[0] to a[...] wherever it ends Binary Search Description - Answer- It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one. 32 teams qualified for the 2014 World Cup. If the names of the teams were arranged in sorted order (an array), how many items in the array would binary search have to examine to find the location of a particular team in the array, in the worst case? Choose 1 answer: Choose 1 answer: A At most, 32. B At most, 6. C At most, 16. D

Show more Read less
Institution
Data Structures Dsa
Module
Data structures dsa









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Data structures dsa
Module
Data structures dsa

Document information

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

Subjects

Content preview

DATA STRUCTURE EXAM
QUESTIONS AND ANSWERS
Algorithm Definition - Answer- A set of steps to accomplish a task...

Algorithm according to Meriam-Webster Dictionary: a procedure for solving a
mathematical problem (as of finding the greatest common divisor) in a finite number
of steps that frequently involves repetition of an operation; broadly : a step-by-step
procedure for solving a problem or accomplishing some end especially by a
computer.

What makes a good algorithm? - Answer- 1. correctness (solves a problem)
2. efficiency

Asymptotic Analysis - Answer- Tells us that some algorithms are more efficient than
others

Merge Sort Big-O notation - Answer- (n log n)
n = # of items
log n= number of splits for that number of items
ex. log2 8=3
8-#of items
3=number of splits for that amount of items

Linear Search Big-O notation - Answer- O(n)
because we must look at all n items from a[0] to a[...] wherever it ends

Binary Search Description - Answer- It works by repeatedly dividing in half the
portion of the list that could contain the item, until you've narrowed down the possible
locations to just one.

32 teams qualified for the 2014 World Cup. If the names of the teams were arranged
in sorted order (an array), how many items in the array would binary search have to
examine to find the location of a particular team in the array, in the worst case?
Choose 1 answer:
Choose 1 answer:

A
At most, 32.

B
At most, 6.

C
At most, 16.

D

, At most, 1. - Answer- B. at most 6

What is
lg(32)
lg(32), the base-2 logarithm of 32?
Choose 1 answer:
Choose 1 answer:

A
5

B
16

C
32

D
1 - Answer- A. 5

You have an array containing the prime numbers from 2 to 311 in sorted order: [2, 3,
5, 7, 11, 13, ..., 307, 311]. There are 64 items in the array. About how many items of
the array would binary search have to examine before concluding that 52 is not in
the array, and therefore not prime?
Choose 1 answer:
Choose 1 answer:

11

7

32

1

64

128

22 - Answer- 7

In 2013, there were 193 member states in the United Nations. If the names of these
states were sorted alphabetically in an array, about how many names would binary
search examine to locate a particular name in the array, in the worst case?
Choose 1 answer:
Choose 1 answer:

A
No more than 9.

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.
Freshy Oxford University
Follow You need to be logged in order to follow users or courses
Sold
52
Member since
1 year
Number of followers
4
Documents
6784
Last sold
17 hours ago

3.6

10 reviews

5
3
4
4
3
1
2
0
1
2

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 exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions