Data Structure Quiz 10
To improve Knowledge in the field of Data Structures and its Concepts
Questions
How many fields are there in a node of a doubly linked list?
- 2
- 3
- 1
- 4
How many pointers are in the assigned state in a 10 - node doubly linked list?
- 20
- 10
- 18
- 8
There are 10 elements in an array. If 4th element is deleted, position of how many elements is changed?
- 7
- 8
- 6
- 5
Given array of elements [50 60 30 40 20 15 25]. In how many comparisons, 4th largest item can be found if Bubble sort is applied?
- 18
- 24
- 22
- None of these
Given an array A[-1:7, 0:6]. The number of rows and columns in this array are
- 9, 7
- 7, 6
- 8, 6
- none of these
In a linear queue, Front = 7 and Rear = 25. What is the number of elements in the queue?
- 18
- 17
- 19
- None of these
What is the similarity between the operations on stack and queues, although they are entirely different?
- Both are LIFO lists.
- Both are FIFO lists.
- Both are linear data structures.
- Insertion in both the data structures take place at the same end.
The queue data structure is not applicable in
- scheduling of jobs in CPU
- printing of documents in printer
- management of files on disk
- typing of letters on keyboard
Given an array A[lb:ub]. The number of elements in this array is given by the formula
- ub - lb
- ub - lb + 1
- ub - lb -1
- lb - ub + 1
How many elements are there in the left half of the partition?
- 8
- 6
- 5
- 7
Let n be the integer and L(n) be a function defined as
L(n) = 0 if n = 1
L(én/2ù) + 2 if n>1
What is the value of L(19)?
- 8
- 10
- 12
- None of these
If PRCD(x, y) function gives TRUE operator and x has precedence over y, what is the output of the function PRCD(*, /)?
- TRUE
- FALSE
- Undefined
- None of these
The function of generating the nth fibonacci number is given below
0 n = 1
Fib(n) = 1 n = 2
Fib(n-1) + Fib(n-2) n>2
What is the value of Fib(10)
- 21
- 34
- 55
- None of these
What is the value of the postfix expression 854*+63/-?
- 26
- 28
- 30
- None of these
What is the value of the expression 23522*+62/-?
- 28
- 31
- 25
- None of these
How many fields are there in a node of a circular doubly linked list?
- 3
- 1
- 2
- 4
If we try to represent a degree - 2 polynomial with linked list, how many fields a node will have?
- 2
- 3
- 4
- 5
How many pointers are in the assigned state in a 10 - node circular doubly linked list?
- 20
- 10
- 18
- 22
Given an infix expression with parenthesis. If we try to convert this postfix in the resultant expression
- all the parenthesis will remain there
- some parenthesis are taken and some discarded
- no parenthesis is taken
- the positions are parenthesised and changed
In the problem of Towers of Hanoi with 4 disks, how many minimum moves are required to transfer all disks from source peg to the destination peg?
- 16
- 15
- 17
- None of these
If all the elements are in the array, then Quick sort runs in……..time.
- O(nlog n)
- O(n2)
- O(n2log n)
- O(n)
If we run quick sort on the set '66 24 59 80 29 35 40 45 65 90', then after first partition, the elements in the right part are
- 65 66 90
- 66 80 90
- 80 90
- none of these
position of which element is fixed?
- 66
- 65
- 80
- none of these
What is the postfix equivalent of abcd?
- bacd
- abcd
- cadb
- None of the above
If PRCD (x, y) function gives TRUE operator, and x has precedence over y. What is the output of the function PRCD(,)?
- TRUE
- FALSE
- Undefined
- None of these