Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4.2 TrustPilot
logo-home
Examen

DATA STRUCTURE EXAM QUESTIONS AND ANSWERS

Note
-
Vendu
-
Pages
7
Grade
A+
Publié le
29-07-2025
Écrit en
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

Montrer plus Lire moins
Établissement
Data Structures Dsa
Cours
Data structures dsa









Oups ! Impossible de charger votre document. Réessayez ou contactez le support.

École, étude et sujet

Établissement
Data structures dsa
Cours
Data structures dsa

Infos sur le Document

Publié le
29 juillet 2025
Nombre de pages
7
Écrit en
2024/2025
Type
Examen
Contient
Questions et réponses

Sujets

Aperçu du contenu

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.
€14,40
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
Freshy Oxford University
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
52
Membre depuis
1 année
Nombre de followers
4
Documents
6784
Dernière vente
17 heures de cela

3,6

10 revues

5
3
4
4
3
1
2
0
1
2

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions