DSA Finals Flashcards
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. overflow
- 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
c. binary search tree
- It is the mother node of a tree structure.
a. root
b. sibling
c. leaves
d. parent
a. root
- It is called the child node of the same parent.
a. ancestors
b. sibling
c. descendants
d. parent
b. sibling
- A data structure that is ideal in representing hierarchical data.
a. tree
b. stack
c. organizational chart
d. queue
a. tree
- 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
b. singly linked list
- Is the number of successive edges from source node to destination node.
a. edge
b. link
c. path length
d. height
c. path length
- A notation where the operators is written before the operands.
a. postfix
b. prefix
c. suffix
d. infix
b. prefix
- All successor of the parent node are called ________ nodes.
a. parent
b. root
c. child
d. sibling
c. child
- The insertion (or addition) stacks operation.
a. pop
b. push
c. top
d. remove
b. push
- The maximum number of children that exists for a node.
a. degree of a node
b. zero
c. root node
d. depth
a. degree of a node
- 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
b. stack
- A tree is binary if each node of it has a maximum of ______ branches.
a. zero
b. two
c. one
d. three
b. two
- 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
c. linked list
- A type of binary tree in which each level of the tree is completely filled.
a. complete
b. restrict
c. strict
d. incomplete
a. complete
- Appending the second list to the end of the first list.
a. addition
b. concatenation
c. insertion
d. deletion
b. concatenation
- 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
c. Link or Edge
- Delete (or remove) an element from a queue (pop)
a. enqueue
b. push
c. dequeue
d. insert
c. dequeue
- It is the simplest form of a tree.
a. array
b. binary tree
c. linked list
d. linked list
b. binary tree
- 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
c. doubly linked list
- 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
c. strictly binary tree
- 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
d. abstract data type
- This node is located at the end of the tree.
a. Leaf
b. root
c. parent
d. level 5
a. Leaf
Question number 36 to 40 convert the given expression to prefix form
- A * C / D
a. * / A C D
b. / * A C D
c. / C D * A
d. * A / C D
b. / * A C D
- It is a group of disjoint trees.
a. subtree
b. forest
c. binary tree
d. root tree
b. forest
- 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
Question number 36 to 40 convert the given expression to prefix form
- 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
- 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
- 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
- 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
- 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
- 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
- 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
Question number 36 to 40 convert the given expression to prefix form
- ( 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
- It connects the two nodes in a tree.
a. line
b. leaf
c. edge
d. path
c. edge
- The level of the root node is always at level _____.
a. level 0
b. level 1
c. level 2
d. depth
a. level 0
Question number 36 to 40 convert the given expression to prefix form
- ( 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
- In expression trees, __________ are operands (constant or variables)
a. node
b. internal node
c. root
d. leaf
a. node
- 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
- A root does not have a _______
a. sibling
b. descendant
c. parent
d. none of the above
c. parent
Question number 36 to 40 convert the given expression to prefix form
- 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
- Each data item in a tree is called a _____.
a. root
b. node
c. parent
d. leaf
b. node
- 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
- 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
Question number 41 to 45 convert the given expression to postfix form
- A * B – C
a. A B * C –
b. A B C * –
c. A B C – *
d. A B – C *
a. A B * C –
- Binary tree operation to create an empty binary tree.
a. isEmpty
b. create
c. parent
d. search
b. create
- Sequence for inorder traversing
a. left-right-root
b. left-root-right
c .root-left-right
d. right-left-root
b. left-root-right
- Sequence for postorder traversing
a. root-left-right
b. left-root-right
c. left-right-root
d. root-right-left
c. left-right-root
Question number 41 to 45 convert the given expression to postfix form
- 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 ^ +
- Occurs when a function is called by itself repeatedly.
a. Repetition
b. Recursion
c. Condition
d. Iteration
b. Recursion
Question number 41 to 45 convert the given expression to postfix form
- 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 / –
g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l
- Parent of e
a. d only
b. c only
c. g only
d. f only
b. c only
Question number 41 to 45 convert the given expression to postfix form
- 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 +
Question number 41 to 45 convert the given expression to postfix form
- 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 – /
- It is the immediate predecessor of a node.
a. parent
b. descendants
c. child
d. sibling
a. parent
- 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
- Maximum level of any leaf of a tree
a. path
b. height
c. depth
d. level
b. height
- Is the rank of tree hierarchy.
a. depth
b. level
c. path
d. height
b. level
- The node with degree zero.
a. sub tree
b. root
c. parent
d. terminal
b. root
g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l
- Sibling of k.
a. i
b. e
c. a
d. none
a. i
- Linked list are
a. dynamic data structure
b. static data structure
c. arrays
d. pointers
a. dynamic data structure
- In simply queue existing elements are deleted from the other end called.
a. front
b. bottom
c. rear
d. middle
a. front
- 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
- Place where insertion and deletion takes place in stack.
a. bottom
b. rear
c. top
d. front
c. top
- 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
- Pointer identifier in the linked list that points to the first node.
a. tail
b. middle
c. rear
d. head
d. head
- The data values in this structure are not arranged in order.
a. stack
b. queue
c. linear
d. non-linear
d. non-linear
- 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
- 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
- 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
- Insert (or add) an element to the queue (push)
a. enqueue
b. dequeue
c. pop
d. traverse
a. enqueue
- In stack collection of data items can only be accessed at the
a. bottom
b. top
c. middle
d. rear
b. top
- Operators is written after the operands.
a. prefix
b. postfix
c. infix
d. polish notation
b. postfix
- Specially designed data elements in a linked list.
a. data
b. next pointer
c. nodes
d. variable address
c. nodes
- The deletion (or remove) stacks operation.
a. enqueue
b. pop
c. dequeue
d. push
b. pop
- 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
- A notation where the Operator is written in-between the operands
a. prefix
b. postfix
c. infix
d. suffix
c. infix
- In simply queue new elements are added at one end called
a. front
b. rear
c. middle
d. top
b. rear
- 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)
- Stack behavior
a. FIFO
b. LIFO
c. LILO
d. FILO
b. LIFO
- 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
- 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
- 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
- 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
- Queue behavior
a. FIFO
b. LIFO
c. LILO
d. FILO
a. FIFO
g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l
- 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
g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l
- 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
g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l
- level of e
a. level 0
b. level 1
c. level 2
d. level 3
c. level 2
g
/ \
c j
/ \ / \
a e i k
\ / \ / \
b d f h l
- descendants of j
a. g only
b. h, i, l, and k
c. i and k
d. c
b. h, i, l, and k
- 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