S133 (Data Structure) FINAL EXAM
Question 1
A data structure in which the limitation of a tree which is of a hierarchical type is lifted. It is collection of
Nodes or vertices and the connections between.
Select one:
a. linked list
b. graph
c. tree
d. array
The correct answer is: graph.
Question 2
Agraph is called a___if each of its edges has an assigned number.
Select one
a. numbered graph
. multigraph
cc. weighted graph
d. circuit
The correct answer is: weighted graph.
Question 3
A linear list in which data can only be inserted at one end called the rear, and deleted from the other end,
called the front.
Select one:
a. queue
b. stack
. linked list
d. tree
The correct answer is: queue.Question 4
A sequence of subroutines and functions, each of which is further organized as declarations followed by
executable statement,
Select one
a. Source file
b. Object file
c. Linker
d. Compiler
The correct answer is: Source file.
Question 5
A sequence of words organized into loader record blocks.
Select one:
a. Source file
b. Object file
c. Linker
d. Compiler
The correct answer is: Object file.
Question 6
A sort method done by scanning an array of unsorted data from the bottom up, and two adjacent
elements are interchanged if they are found to be out of order with respect to each other.
Select one
a. selection
b. bubble
c. insertion
d. merge
The correct answer is: bubble.Question 7
Nan tree, originally called admissible tree, is one in which the height of the left and right
subtrees of every node differ by at most one.
Select one:
a. ALV
b. AVL
cc. Huffman
d. LAV
The correct answer is: AVL.
Question 8
An aggregation of atornic and composite data types into a set with defined relationships.
Select one
a. abstract data type
b. atomic data
c. data structure
d. linked list
The correct answer is: data structure.
Question 9
‘An algorithm for traversing a graph that was developed by John Hoperoft and Robert Tarjan,
Select one
a. height-first search
b. breadth-first search
c. width-first search
d. depth-first search
The correct answer is: depth-first search.
Question 10
‘An algorithm used for finding a minimum spanning tree of a graph.
Select one:
a. Kuskal's Algorithm
b. WFI Algorithm
c. Dijktra's Algorithm
d. Ford Algorithm,
The correct answer is: Kuskal's Algorithm.Question 11
An algorithm used for finding the shortest path in a graph.
Select one:
a. Kruskal's Algorithm
b. Hopcroft-Tarjan Algorithm
c. Diktra’s Algorithm
d. Tarjan's Algorithm
The correct answer is: Djktra's Algorithm.
Question 12
‘An ordered collection of data in which each element contains the location of the next element.
Select one
a. Linked List
b. Queue
c. Stack
d. Tree
The correct answer is: Linked List.
Question 13
‘An undirected graph is said tobe _ when there is a path between any two vertices of the graph.
Select one
a. disconnected
b. connected
c. minimal
d. cycle
The correct answer is: connected,
Question 14
Consists of a nonempty set V of vertices and a possibly empty set E of edges, each edge being a set of
two vertices from V.
Select one:
a. digraph
b. directed graph
cc. simple graph
d. multiple graph
The correct answer is: simple graph.Question 15
Consists of a nonempty set V of vertices and a set E of arcs, where each arc is a pair of vertices from V.
Select one:
a. simple graph
b. multiple graph
c. directed graph
d. pseudograph
The correct answer is: directed graph.
Question 16
Creating a/an whenever a function is called allows a system to handle recursion properly.
Select one:
a. function call
b. activation record
c. data structures
d. stack and queue
The correct answer is: activation record.
Question 17
Defined as the structure of file in a sequence of words characters organized into lines.
Select one:
a. block file
b, text fle
c. linear fle
d. source file
The correct answer is: text file.
Question 18
Enqueue operation inserts an element at the ___ of the queue.
Select one:
a. front
b. middle
c. rear
d. top
The correct answer is: rear.Question 19
Entries in a stack are "ordered". What is the meaning of this statement?
Select one:
a. A collection of Stacks can be sorted.
b. The entries must be stored in a linked list.
c. Stack entries may be compared with the '⁢' operation.
d. There is a frst entry, a second entry, and so on.
The correct answer is: There is a first entry, a second entry, and so on...
Question 20
Given the postfix expression: A B* CD +-E +. What is the infix expression?
Select one
aA*B-C+D+E
b.(A*B)-C+(D+E)
c.A*(B-C)+(D+E)
d.A'B-(C+D)+E
The correct answer is: A* B- (C+D) +E.
Question 21
If the character 'D', 'C’, 'B', ‘A’ are placed in a stack (in that order), and then removed one at a time, and
placed a queue in what order will they be removed from the queue?
Select one:
a. ABCD,
b. DCAB
c. ABDC
d. DCBA
The correct answer is: ABDC.
Question 22
Ina Binary Search Tree, the node with the smallest value is found at the
Select one:
a. root
b. rightmost leaf
c. leftmost leaf
d. leat
The correct answer is: leftmost leaf.Question 23
In a Binary Search Tree, the node with the largest value is found at the .
Select one:
a. root.
b. rightmost leaf
c. leftmost lea
d. leat
‘The correct answer is: root.
Question 24
It consists of a finite set of elements called nodes and a finite set of directed lines called branches.
Select one:
a. Tree
b. Data and Link
c. Graph
d. Pictograph
‘The correct answer is: Tree.
Question 25
itis alist in which the last node's link points to the first node of the list
Select one:
a. Doubly Linked list
b. Multtilinked list
c. Circular linked list
d. Singly linked list
The correct answer is: Circularly linked list.
Question 26
It is anode with an outdegree of zero.
Select one:
a. Ancestor
b. Leaf
The correct answer is: Leaf.Question 27
Itis a repetitive process in which algorithm calls itself.
Select one:
a. Repetition
b. Iteration
cc. Recursion
d. Inheritance
‘The correct answer is: Recursion.
Question 28
It is a sequence of characters organized into lines
Select one:
a. source file
b. file heading
c. text file
d. object file
‘The correct answer is: text file.
Question 29
One difference between a queue and a stack is:
Select one:
a. Queues require linked lists, but stacks do not.
b. Queues use two ends of the structure, stacks use only one.
c. Stacks require linked lists, but queues do not.
d. Stack use two ends of the structure, queues use only one
The correct answer is: Queues use two ends of the structure, stacks use only one..
Question 30
Queue is a
Select one:
a. FIFO list
b. FOFI ist
c. LIFO list
d. FCSF list
The correct answer is: FIFO list.Question 31
(Queues may be implemented using arrays or
Select one
a. linked list
b. binary trees
c. stacks
d. graphs
The correct answer fs: linked list.
Question 32
See algorithm 1. What would be retumed if fxm is called as fxm(2,7)?
algot
Select one:
a3
aoe
oo
The correct answer is: -3
Question 33
See algorithm 1. What would be retumed if fxm is called as fxm(6,3)?
algo2
Select one:
The correct answer is: 0Question 34
See algorithm 1. What would be returned if fun is called as fxm(15,3)?
algo3
Select one:
a3
eos
. 6
6
9
The correct answer is: 6
Question 35
See algorithm 2. What would be returned if fxm is called as fxrn(10)?
algo4
Select one
a0
b.21
c.19
d. 45
The correct answer is: 21
Question 36
See algorithm 2. What would be returned if fxm is called as fxrn(12)?
algo5
Select one
a0
b.21
c.19
0.45
The correct answer is: 45Question 37
Sorting by attempting to localize the exchanges of array elements by finding a misplaced element first
and putting in its final place
Select one:
a. quicksort
b. insertion
c. bubble
d. selection
The correct answer is: selection.
Question 38
The most commonly used notation for asymptotic complexity for estimating the rate of function growth
that was introduced in 1894 by Paul Bachman,
Select one:
a. big-Oh notation
b. big-Theta notation
c. big-Omega notation
d. lttle-Oh notation
The correct answer is: big-Oh notation.
Question 39
The retrieve stack operation copies the item at the:
Select one:
a. end of the stack
b. top of the stack
c. bottom of the stack
d. middle of the stack
The correct answer is: top of the stack.
Question 40
The sorting algorithm that problem remains which value to chose as the pivot or bound value.
Select one:
a. merge
b. insertion
c. selection
d. quicksort
The correct answer is: quicksort.Question 41
The sorting starts by considering the two first elements of the array data, and if they are out of order, and
interchange takes place.
Select one:
a. insertion
b. bubble
c. selection
d. quicksort
The correct answer is: insertion.
Question 42
These are provided to create, write, read, rewind, and delete files.
Select one:
a. system calls
b. fle system
c. records
d. platform
The correct answer is: system calls.
Question 43
What is the inorder traversal of the binary tree in Figure 12
bt
Select one:
a ABFCGDEHIJK
b. DECBHKJIGFA
c. DCEBAHFGIJK
d. DCEBAFHGIJK
The correct answer is:D CEBAFHGIJKQuestion 44
What is the postfix equivalent of: A+ B*C-D/E?
Select one:
a. ABCHDE-/
b. ABC*+DE-/
c. ABC’+DE/+
d. ABC-+DE*/
The correct answer is: ABC’+DE/-.
Question 45
What is the postorder traversal of the binary tree in Figure 1?
B3
Select one:
a.DECBHKJIGFA
b.ABCDEFGHIJK
o. DCEBAFHGIJK
d.ABFCGDEHIJK
The correct answer is: D EC BHKJIGFA
Question 46
What is the preorder traversal of the binary tree in Figure 1?
Select one:
a. DCEBAFHGIJK
b. ABFCGDEHIJK
c. ABCDEFGHIJK
d.ABCDEFGHJIK
The correct answer is: A BC DEFGHIJK
Question 47
What kind of binary search tree traversal produces an ordered list?
Select one:
a. preorder
b. inorder
c. breadth first
d. postorder
The correct answer is: breadth first.Question 48
Which of the following is a TRUE statement?
Select one:
a. Arrays allow random accessing of data and linked lists do not.
b. Linked lists allow random access of data and arrays do not.
c. Both arrays and linked lists allow rancom access of data
d. Both arrays and linked lists do not allow random access of data.
The correct answer is: Both arrays and linked lists allow random access of data.
Question 49
Which of the following is the infix expression of the expression tree of Figure 2?
B2
Select one:
a.C*(A+B)+D*(F*(G+H)
C*(A*B)+D*(F*(G+H)
c.(A+B)+D*C"(F*(G +H)
D*(A+B)+C"(F*(G+H)
The correct answer is: C * (A + B) + D*(F* (G+H)
Question 50
Which of the following is the postfix expression of the expression tree in Figure 2?
BS
Select one:
a.CAB+*DFGH#+**+
b.CAB+"DFGH+"+*
c.CAB*+DFGH+*"+
d.CAB+*DFGH**++
The correct answer is; CAB+*DFGH+**+