Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

DATA STRUCTURES AND ALGORITHMS FINAL REVIEW EXAM QUESTIONS ANSWERS

Beoordeling
-
Verkocht
-
Pagina's
22
Cijfer
A+
Geüpload op
28-07-2025
Geschreven in
2024/2025

DATA STRUCTURES AND ALGORITHMS FINAL REVIEW EXAM QUESTIONS ANSWERS

Instelling
DATA STRUCTURES
Vak
DATA STRUCTURES

Voorbeeld van de inhoud

DATA STRUCTURES AND
ALGORITHMS FINAL REVIEW EXAM
QUESTIONS ANSWERS



50) Which of the following is the time complexity to search an element in the linked list?
a. O(1)
O(n)
O(logn)
O(nlogn)
Answer: O(n) - Correct Answers -Answer: O(n)
Explanation: The answer is O(n). The worst-case time complexity to search an element
in the linked list is O(n) because if we have to find the last element then we need to
traverse till the nth node.

33. Which type of data structure is a ternary heap?a) Hash
b) Array
c) Priority Stack
d) Priority Queue - Correct Answers -

1. Which of following data structure is more appropriate for implementing quick
sortiteratively?
(A) Deque
(B) Queue
(C) Stack
(D) Priority queue - Correct Answers -C
Stack

1. The number of edges in a complete graph of n vertices is
a. n(n+1)/2
b. n(n-1)/2
c. n2/2
d. n - Correct Answers -B
n(n-1)/2

1. If two trees have same structure and but different node content, then they are called
_
a. Synonyms trees
b. Joint trees

,c. Equivalent trees
d. Similar trees - Correct Answers -D
Similar trees

1. If two trees have same structure and node content, then they are called
a. Synonyms trees
b. Joint trees
c. Equivalent trees
d. Similar trees - Correct Answers -Ans: C
Equivalent

1. Finding the location of a given item in a collection of items is called ......
A. Discovering
B. Finding
C. Searching
D. Mining - Correct Answers -Ans. C
searching

1. The time complexity of quicksort is ........
A. O(n)
B. O(logn)
C. O(n2)
D. O(n logn) - Correct Answers -Ans. D
O(n logn)

1. Quick sort is also known as ........
A. merge sort
B. tree sort
C. shell sort
D. partition and exchange sort - Correct Answers -Ans. D
partition and exchange sort

8. sorting is good to use when alphabetizing a large list of names.
A. Merge
B. Heap
C. Radix
D. Bubble - Correct Answers -Ans. C
Radix

9. The total number of comparisons in a bubble sort is ....
A. O(n logn)
B. O(2n)
C. O(n2)
D. O(n) - Correct Answers -Ans. A )
O(n logn)

, 10. The data structure required for Breadth First Traversal on a graph is?
a) Array
b) Stack
c) Tree
d) Queue - Correct Answers -Answer: d
Queue

Explanation: In Breadth First Search Traversal, BFS, starting vertex is first taken and
adjacent vertices which are unvisited are also taken. Again, the first vertex which was
added as an unvisited adjacent vertex list will be considered to add further unvisited
vertices of the graph. To get the first unvisited vertex we need to follows First In First
Out principle. Queue uses FIFO principle.

11. The prefix form of A-B/ (C * D ^ E) is?
a) -A/B*C^DE
b) -A/BC*^DE
c) -ABCD*^DE
d) -/*^ACBDE - Correct Answers -Answer: a
-A/B*C^DE

Explanation: Infix Expression is A-B/(C*D^E)This can be written as: A-
(B/(C*(D^E)))Thus prefix expression is -A/B*C^DE.

12. Which of the following points is/are not true about Linked List data structure when it
is compared with an array?
a) Random access is not allowed in a typical implementation of Linked Lists
b) Access of elements in linked list takes less time than compared to arrays
c) Arrays have better cache locality that can make them better in terms of performance
d) It is easy to insert and delete elements in Linked List - Correct Answers -Answer: b
Access of elements in linked list takes less time than compared to arrays

Explanation: To access an element in a linked list, we need to traverse every element
until we reach the desired element. This will take more time than arrays as arrays
provide random access to its elements.

13. Which data structure is based on the Last In First Out (LIFO) principle?
a) Tree
b) Linked List
c) Stack
d) Queue - Correct Answers -Answer: c
Stack

Explanation: The data structure that follows the Last In First Out (LIFO) principle is the
Stack. It operates like a stack of objects, making it suitable for specific-order
management.

Geschreven voor

Instelling
DATA STRUCTURES
Vak
DATA STRUCTURES

Documentinformatie

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

Onderwerpen

$14.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

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.
millyphilip West Virginia University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2923
Lid sinds
4 jaar
Aantal volgers
1958
Documenten
44307
Laatst verkocht
14 uur geleden
white orchid store

EXCELLENCY IN ACCADEMIC MATERIALS ie exams, study guides, testbanks ,case, case study etc

3.6

551 beoordelingen

5
239
4
87
3
104
2
32
1
89

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

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen