100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

DATA STRUCTURE EXAM QUESTIONS AND ANSWERS

Beoordeling
-
Verkocht
-
Pagina's
7
Cijfer
A+
Geüpload op
29-07-2025
Geschreven 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

Meer zien Lees minder
Instelling
Data Structures Dsa
Vak
Data structures dsa

Voorbeeld van de inhoud

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.

Geschreven voor

Instelling
Data structures dsa
Vak
Data structures dsa

Documentinformatie

Geüpload op
29 juli 2025
Aantal pagina's
7
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Freshy Oxford University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
59
Lid sinds
1 jaar
Aantal volgers
5
Documenten
6977
Laatst verkocht
2 weken geleden

3,6

10 beoordelingen

5
3
4
4
3
1
2
0
1
2

Populaire documenten

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen