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
Q
  1. It is a group of disjoint trees.

a. subtree
b. forest
c. binary tree
d. root tree

A

b. forest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. 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

A

b. bubble sort

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

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

  1. 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. – + A ^ B C D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
  1. 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

a. selection sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  1. 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

A

d. insertion sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
  1. Is the process of combining two or more sorted array into a third sorted array.

a. merging
b. selecting
c. inserting
d. sorting

A

a. merging

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
  1. 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

A

c. heap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q
  1. 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

A

d. root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q
  1. 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

a. array

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

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

  1. ( 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

b. / * + A B C D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q
  1. It connects the two nodes in a tree.

a. line
b. leaf
c. edge
d. path

A

c. edge

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q
  1. The level of the root node is always at level _____.

a. level 0
b. level 1
c. level 2
d. depth

A

a. level 0

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

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

  1. ( 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. – ^ * A B C * D F

25
Q
  1. In expression trees, __________ are operands (constant or variables)

a. node
b. internal node
c. root
d. leaf

26
Q
  1. 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

A

c. more than or identical

27
Q
  1. A root does not have a _______

a. sibling
b. descendant
c. parent
d. none of the above

28
Q

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

  1. 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. – + A B / * C D ^ EF

28
Q
  1. Each data item in a tree is called a _____.

a. root
b. node
c. parent
d. leaf

29
Q
  1. 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

A

d. tree traversal

30
Q
  1. Is a link field and holds the address of its left node.

a. left child
b. right child
c. sibling
d. parent

A

a. left child

31
Q

Question number 41 to 45 convert the given expression to postfix form

  1. A * B – C

a. A B * C –
b. A B C * –
c. A B C – *
d. A B – C *

A

a. A B * C –

31
Q
  1. Binary tree operation to create an empty binary tree.

a. isEmpty
b. create
c. parent
d. search

32
Q
  1. Sequence for inorder traversing

a. left-right-root
b. left-root-right
c .root-left-right
d. right-left-root

A

b. left-root-right

33
Q
  1. Sequence for postorder traversing

a. root-left-right
b. left-root-right
c. left-right-root
d. root-right-left

A

c. left-right-root

34
Q

Question number 41 to 45 convert the given expression to postfix form

  1. 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

c. A B C – D ^ +

34
Q
  1. Occurs when a function is called by itself repeatedly.

a. Repetition
b. Recursion
c. Condition
d. Iteration

A

b. Recursion

35
Q

Question number 41 to 45 convert the given expression to postfix form

  1. 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

c. A B ^ C D / –

35
Q

g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l

  1. Parent of e

a. d only
b. c only
c. g only
d. f only

40
Q

Question number 41 to 45 convert the given expression to postfix form

  1. 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

b. A B C * / D +

41
Q

Question number 41 to 45 convert the given expression to postfix form

  1. 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

d. A B C * ^ D F – /

42
Q
  1. It is the immediate predecessor of a node.

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

47
Q
  1. 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

48
Q
  1. Maximum level of any leaf of a tree

a. path
b. height
c. depth
d. level

52
Q
  1. Is the rank of tree hierarchy.

a. depth
b. level
c. path
d. height

55
Q
  1. The node with degree zero.

a. sub tree
b. root
c. parent
d. terminal

56
Q

g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l

  1. Sibling of k.

a. i
b. e
c. a
d. none

57
Q
  1. Linked list are

a. dynamic data structure
b. static data structure
c. arrays
d. pointers

A

a. dynamic data structure

58
Q
  1. In simply queue existing elements are deleted from the other end called.

a. front
b. bottom
c. rear
d. middle

59
Q
  1. 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

A

b. input restricted queue

60
Q
  1. Place where insertion and deletion takes place in stack.

a. bottom
b. rear
c. top
d. front

61
Q
  1. Queue elements where it is represented in a circular fashion way

a. deque
b. double ended queue
c. circular queue
d. priority queue

A

c. circular queue

62
Q
  1. Pointer identifier in the linked list that points to the first node.

a. tail
b. middle
c. rear
d. head

63
Q
  1. The data values in this structure are not arranged in order.

a. stack
b. queue
c. linear
d. non-linear

A

d. non-linear

64
Q
  1. Type of data structures, data values of different types are grouped and stored.

a. homogenous
b. pointer
c. linked list
d. non-homogenous

A

c. linked list

65
Q
  1. 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

A

c. double ended queue

66
Q
  1. 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

A

c. decremented by 1

67
Q
  1. Insert (or add) an element to the queue (push)

a. enqueue
b. dequeue
c. pop
d. traverse

A

a. enqueue

68
Q
  1. In stack collection of data items can only be accessed at the

a. bottom
b. top
c. middle
d. rear

69
Q
  1. Operators is written after the operands.

a. prefix
b. postfix
c. infix
d. polish notation

A

b. postfix

70
Q
  1. Specially designed data elements in a linked list.

a. data
b. next pointer
c. nodes
d. variable address

71
Q
  1. The deletion (or remove) stacks operation.

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

72
Q
  1. Is the operation of data and the operations allowed on that data.

a. structured
b. primitive data types
c. data structure
d. object oriented

A

c. data structure

73
Q
  1. A notation where the Operator is written in-between the operands

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

74
Q
  1. In simply queue new elements are added at one end called

a. front
b. rear
c. middle
d. top

75
Q
  1. 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

a. negative one (-1)

76
Q
  1. Stack behavior

a. FIFO
b. LIFO
c. LILO
d. FILO

77
Q
  1. 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

A

b. output restricted queue

78
Q
  1. 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

A

b. traversing

79
Q
  1. 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

80
Q
  1. Type of data structure where values of the same types of data are stored.

a. pointer
b. linked list
c. non-homogeneous
d. homogeneous

A

d. homogeneous

81
Q
  1. Queue behavior

a. FIFO
b. LIFO
c. LILO
d. FILO

82
Q

g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l

  1. descendants of c

a. a and e
b. g only
c. a, b, d, e, and f
d. j only

A

c. a, b, d, e, and f

83
Q

g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l

  1. 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

A

d. b, d, f, h , l, and k

84
Q

g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l

  1. level of e

a. level 0
b. level 1
c. level 2
d. level 3

A

c. level 2

85
Q

g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l

  1. descendants of j

a. g only
b. h, i, l, and k
c. i and k
d. c

A

b. h, i, l, and k

86
Q
  1. In Binary tree, any node that has at least one empty child

a. external node
b. leaf
c. internal node
d. root node

A

c. internal node