DSA Finals Flashcards

1
Q

26.A condition occurs if the array is full and no new element can be accommodated.

a. overflow
b. underflow
c. full
d. empty

A

a. overflow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. Stores keys in the nodes in a way so that searching, insertion and deletion can be done efficiently.

a. struct
b. tree data structure
c. binary search tree
d. heap

A

c. binary search tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. It is the mother node of a tree structure.

a. root
b. sibling
c. leaves
d. parent

A

a. root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. It is called the child node of the same parent.

a. ancestors
b. sibling
c. descendants
d. parent

A

b. sibling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. A data structure that is ideal in representing hierarchical data.

a. tree
b. stack
c. organizational chart
d. queue

A

a. tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. Enables a program to move through the list in one direction, which is usually from the front of the list moving to the end of the list.

a. doubly linked list
b. singly linked list
c. circular linked list
d. doubly circular linked list

A

b. singly linked list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. Is the number of successive edges from source node to destination node.

a. edge
b. link
c. path length
d. height

A

c. path length

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. A notation where the operators is written before the operands.

a. postfix
b. prefix
c. suffix
d. infix

A

b. prefix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. All successor of the parent node are called ________ nodes.

a. parent
b. root
c. child
d. sibling

A

c. child

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. The insertion (or addition) stacks operation.

a. pop
b. push
c. top
d. remove

A

b. push

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. The maximum number of children that exists for a node.

a. degree of a node
b. zero
c. root node
d. depth

A

a. degree of a node

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. Is a collection of items that exhibits the behavior that the last item in is the first item out.

a. queue
b. stack
c. linked list
d. circular queue

A

b. stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. A tree is binary if each node of it has a maximum of ______ branches.

a. zero
b. two
c. one
d. three

A

b. two

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. Is a data structure that makes it easy to rearrange data without having to move data in memory.

a. array
b. stack array
c. linked list
d. queue array

A

c. linked list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. A type of binary tree in which each level of the tree is completely filled.

a. complete
b. restrict
c. strict
d. incomplete

A

a. complete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. Appending the second list to the end of the first list.

a. addition
b. concatenation
c. insertion
d. deletion

A

b. concatenation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. It is the line drawn from one node to other node in a tree.

a. flow lines
b. height
c. Link or Edge
d. path

A

c. Link or Edge

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. Delete (or remove) an element from a queue (pop)

a. enqueue
b. push
c. dequeue
d. insert

A

c. dequeue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. It is the simplest form of a tree.

a. array
b. binary tree
c. linked list
d. linked list

A

b. binary tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. Enables the program to move through the list in both directions.

a. circular linked list
b. singly linked list
c. doubly linked list
d. queue

A

c. doubly linked list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. A type of binary tree where every non-leaf node is filled with left and right sub-trees

a. complete
b. incomplete
c. strictly binary tree
d. complex

A

c. strictly binary tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Stores data and allow various operations on the data to access and change it.

a. data structure
b. int data type
c. primitive data type
d. abstract data type

A

d. abstract data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. This node is located at the end of the tree.

a. Leaf
b. root
c. parent
d. level 5

A

a. Leaf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Question number 36 to 40 convert the given expression to prefix form

  1. A * C / D

a. * / A C D
b. / * A C D
c. / C D * A
d. * A / C D

A

b. / * A C D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
65. It is a group of disjoint trees. a. subtree b. forest c. binary tree d. root tree
b. forest
16
66. A sort algorithm where each element is compared with its adjacent element. If the first element is larger than the second one, then the positions of the elements are interchanged, otherwise it is not changed a. quick sort b. bubble sort c. heap sort d. selection sort
b. bubble sort
17
Question number 36 to 40 convert the given expression to prefix form 37. A + B ^ C – D a. – + A ^ B C D b. ^ – + A B C D c. + A B ^ – C D d. – + ^ A B C D
a. – + A ^ B C D
17
67. A sort algorithm that finds the smallest element of the array and interchanges it with the element in the first position of the array. Then it finds the second smallest element from the remaining elements in the array and places it in the second position of the array and so on. a. selection sort b. quick sort c. bubble sort d. insertion sort
a. selection sort
18
68. Sorting algorithm that sorts a set of values by inserting values into an existing sorted file. a. selection sort b. quick sort c. bubble sort d. insertion sort
d. insertion sort
19
69. Is the process of combining two or more sorted array into a third sorted array. a. merging b. selecting c. inserting d. sorting
a. merging
20
70. A sorting algorithm that is defined as an almost complete binary tree of n nodes such that the value of each node is less than or equal to the value of the father. a. insertion b. selection c. heap d. quick
c. heap
21
71. In Binary Search Tree a key value in the left child is more than the value of _____. a. parent b. ancestor c. sibling d. root
d. root
22
72. The node of a tree stores the data and its role is the same as in the ___________. a. array b. linked list c. primitive data types d. stack
a. array
23
Question number 36 to 40 convert the given expression to prefix form 38. ( A + B ) * C / D a. * + A B / C D b. / * + A B C D c. + A B * / C D d. * + / A B C D
b. / * + A B C D
23
73. It connects the two nodes in a tree. a. line b. leaf c. edge d. path
c. edge
24
74. The level of the root node is always at level _____. a. level 0 b. level 1 c. level 2 d. depth
a. level 0
25
Question number 36 to 40 convert the given expression to prefix form 39. ( A * B ) ^ C – D * F a. – ^ * A B C * D F b. – * A ^ B C * D F c. * A B ^ – C * D F d. * ^ – A B C * D F
a. – ^ * A B C * D F
25
75. In expression trees, __________ are operands (constant or variables) a. node b. internal node c. root d. leaf
a. node
26
76. In Binary Search Tree a key value in the right child is ____________to the value of root. a. more than only b. equal c. more than or identical d. less than
c. more than or identical
27
77. A root does not have a _______ a. sibling b. descendant c. parent d. none of the above
c. parent
28
Question number 36 to 40 convert the given expression to prefix form 40. A + B – C * D / E ^ F a. – + A B / * C D ^ EF b. + A B – * C D / ^ EF c. + A B – * C / D E^ F d. + A B – / * C D ^ EF
a. – + A B / * C D ^ EF
28
78. Each data item in a tree is called a _____. a. root b. node c. parent d. leaf
b. node
29
79. Refers to the process of visiting each node in a tree data structure, exactly once, in a systematic way a. searching b. sorting c. merging d. tree traversal
d. tree traversal
30
80. Is a link field and holds the address of its left node. a. left child b. right child c. sibling d. parent
a. left child
31
Question number 41 to 45 convert the given expression to postfix form 41. A * B – C a. A B * C – b. A B C * – c. A B C – * d. A B – C *
a. A B * C –
31
81. Binary tree operation to create an empty binary tree. a. isEmpty b. create c. parent d. search
b. create
32
82. Sequence for inorder traversing a. left-right-root b. left-root-right c .root-left-right d. right-left-root
b. left-root-right
33
83. Sequence for postorder traversing a. root-left-right b. left-root-right c. left-right-root d. root-right-left
c. left-right-root
34
Question number 41 to 45 convert the given expression to postfix form 42. A + ( B – C ) ^ D a. A B C – D + ^ b. A B C – + D ^ c. A B C – D ^ + d. A B C D + – ^
c. A B C – D ^ +
34
84. Occurs when a function is called by itself repeatedly. a. Repetition b. Recursion c. Condition d. Iteration
b. Recursion
35
Question number 41 to 45 convert the given expression to postfix form 43. A ^ B – C / D a. A B C D ^ – / b. A B C ^ – D / c. A B ^ C D / – d. A B ^ – C D /
c. A B ^ C D / –
35
g / \ c j / \ / \ a e i k \ / \ / \ b d f h l 85. Parent of e a. d only b. c only c. g only d. f only
b. c only
40
Question number 41 to 45 convert the given expression to postfix form 44. A / ( B * C ) + D a. A B C D / * + b. A B C * / D + c. A B / C * D + d. A B C / * D +
b. A B C * / D +
41
Question number 41 to 45 convert the given expression to postfix form 45. A ^ ( B * C ) / ( D – F ) a. A B C D F ^ * / – b. A B C * ^ / D F – c. A B C * ^ D F / – d. A B C * ^ D F – /
d. A B C * ^ D F – /
42
46. It is the immediate predecessor of a node. a. parent b. descendants c. child d. sibling
a. parent
47
47. The highest number of nodes that is possible in a way starting from first node (ROOT) to a leaf. a. height b. depth c. level d. path
a. height
48
48. Maximum level of any leaf of a tree a. path b. height c. depth d. level
b. height
52
49. Is the rank of tree hierarchy. a. depth b. level c. path d. height
b. level
55
50. The node with degree zero. a. sub tree b. root c. parent d. terminal
b. root
56
g / \ c j / \ / \ a e i k \ / \ / \ b d f h l 86. Sibling of k. a. i b. e c. a d. none
a. i
57
1. Linked list are a. dynamic data structure b. static data structure c. arrays d. pointers
a. dynamic data structure
58
2. In simply queue existing elements are deleted from the other end called. a. front b. bottom c. rear d. middle
a. front
59
3. Allows insertion at only one end (rear end) but allows deletion at both ends, rear and front ends on the lists. a. output restricted queue b. input restricted queue c. priority queue d. circular queue
b. input restricted queue
60
4. Place where insertion and deletion takes place in stack. a. bottom b. rear c. top d. front
c. top
61
5. Queue elements where it is represented in a circular fashion way a. deque b. double ended queue c. circular queue d. priority queue
c. circular queue
62
6. Pointer identifier in the linked list that points to the first node. a. tail b. middle c. rear d. head
d. head
63
7. The data values in this structure are not arranged in order. a. stack b. queue c. linear d. non-linear
d. non-linear
64
8. Type of data structures, data values of different types are grouped and stored. a. homogenous b. pointer c. linked list d. non-homogenous
c. linked list
65
9. Is a homogenous list in which elements can be added or inserted and deleted or removed from both ends. a. priority queue b. circular queue c. double ended queue d. dequeue
c. double ended queue
66
10. In stack every pop operation, the top of the stack is. a. doesn’t change b. incremented by 2 c. decremented by 1 d. incremented by 1
c. decremented by 1
67
11. Insert (or add) an element to the queue (push) a. enqueue b. dequeue c. pop d. traverse
a. enqueue
68
12. In stack collection of data items can only be accessed at the a. bottom b. top c. middle d. rear
b. top
69
13. Operators is written after the operands. a. prefix b. postfix c. infix d. polish notation
b. postfix
70
14. Specially designed data elements in a linked list. a. data b. next pointer c. nodes d. variable address
c. nodes
71
15. The deletion (or remove) stacks operation. a. enqueue b. pop c. dequeue d. push
b. pop
72
16. Is the operation of data and the operations allowed on that data. a. structured b. primitive data types c. data structure d. object oriented
c. data structure
73
17. A notation where the Operator is written in-between the operands a. prefix b. postfix c. infix d. suffix
c. infix
74
18. In simply queue new elements are added at one end called a. front b. rear c. middle d. top
b. rear
75
19. In stack program the top of stack is initialized to a value a. negative one (-1) b. positive one (1) c. zero (0) d. NULL value
a. negative one (-1)
76
20. Stack behavior a. FIFO b. LIFO c. LILO d. FILO
b. LIFO
77
21. Allows deletion at only one end (front end) but allows insertion at both ends, rear and front ends, of the lists. a. input restricted b. output restricted queue c. circular queue d. simply queue
b. output restricted queue
78
22. Process of going through all the nodes from one end to another end of the linked list. a. searching b. traversing c. looping d. inserting
b. traversing
79
23. The process of inserting an element on one end and deleting an element on the other end a. stack b. dequeue c. queue d. linked list
c. queue
80
24. Type of data structure where values of the same types of data are stored. a. pointer b. linked list c. non-homogeneous d. homogeneous
d. homogeneous
81
25. Queue behavior a. FIFO b. LIFO c. LILO d. FILO
a. FIFO
82
g / \ c j / \ / \ a e i k \ / \ / \ b d f h l 87. descendants of c a. a and e b. g only c. a, b, d, e, and f d. j only
c. a, b, d, e, and f
83
g / \ c j / \ / \ a e i k \ / \ / \ b d f h l 88. Who are the leaf nodes a. b, d, f, h and l b. a, c, e, g, i, j, and k c. b and k d. b, d, f, h , l, and k
d. b, d, f, h , l, and k
84
g / \ c j / \ / \ a e i k \ / \ / \ b d f h l 89. level of e a. level 0 b. level 1 c. level 2 d. level 3
c. level 2
85
g / \ c j / \ / \ a e i k \ / \ / \ b d f h l 90. descendants of j a. g only b. h, i, l, and k c. i and k d. c
b. h, i, l, and k
86
51. In Binary tree, any node that has at least one empty child a. external node b. leaf c. internal node d. root node
c. internal node