PATNI Previous Years Solved Sample Placement Papers
-
Which of the following conclusions can be deduced from the passage?
A) A social order based on truth and non-violence alone can help the achievement of political freedom.
B) After establishing the social order of Gandhiji's pattern, the possibility of a conflict between different classes of society will hardly exist. (Ans)
C) It is difficult to change the mind and attitude of men towards property.
D) In an egalitarian society, material satisfaction can be enjoyed only at the expense of others.
-
According to the passage, what does "adoption of the ideal of trusteeship" mean?
A) Equating peace and progress with material satisfaction.
B) Adoption of the ideal by the 'haves' for the benefit of ‘have-nots’. (Ans)
C) Voluntary enlightened remuneration of the possessive instinct by the privileged class.
D) Substitution of spiritual values by material ones by those who live in the paradise of material satisfaction.
-
Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?
a) Insertion Sort
b) Quick Sort
c) Heap Sort
d) Merge Sort
Answer: d
Explanation: Both Merge sort and Insertion sort can be used for linked lists. The slow random-access performance of a linked list makes other algorithms (such as quicksort) perform poorly, and others (such as heapsort) completely impossible. Since the worst-case time complexity of Merge Sort is O(nLogn) and Insertion sort is O(n²), merge sort is preferred.
-
A B-tree of order 4 and of height 3 will have a maximum of _______ keys.
A) 255 (Ans)
B) 63
C) 127
D) 188
-
Five node splitting operations occurred when an entry is inserted into a B-tree. Then how many nodes are written?
A) 14
B) 7
C) 11 (Ans)
D) 5
-
B-tree and AVL tree have the same worst-case time complexity for insertion and deletion.
A) True (Ans)
B) False
-
2-3-4 trees are B-trees of order 4. They are an isometric of _____ trees.
A) AVL
B) AA
C) 2-3
D) Red-Black (Ans)
-
What is the maximum height of an AVL tree with p nodes?
- a) p
- b) log(p) (Ans)
- c) log(p)/2
- d) p^2
Explanation: The number of nodes in terms of height follows the recurrence relation: N(he) = N(he-1) + 1 + N(he-2). Solving this relation gives N(he) = O(logp) as the worst-case height.
-
To restore the AVL property after inserting an element, do we start at the insertion point and move towards the root of the tree?
- a) true (Ans)
- b) false
Explanation: After insertion, only the path from the insertion point to the root or specific subtrees may become imbalanced in terms of height.
-
Given an empty AVL tree, how would you construct an AVL tree when a set of numbers is given without performing any rotations?
- a) just build the tree with the given input
- b) find the median of the set of elements given, make it the root, and construct the tree (Ans)
- c) use trial and error
- d) use dynamic programming to build the tree
Explanation: Constructing the tree with the median as the root ensures balance without requiring rotations.
-
The memory address of element A[i][j] in row-major order is:
A: loc(A[i][j]) = base(A) + W((i-LB) + n(j-LB))
B: loc(A[i][j]) = base(A) + W(n(j-LB) + (i-LB))
C: loc(A[j][i]) = base(A) + W(n(I-LB) + n(j-LB))
D: loc(A[i][j]) = base(A) + W((I-LB) + n(j-LB))
Ans: B -
The memory address of elements A[i][j] in column-major order is:
A: loc(A[i][j]) = base(A) + W((I-LB) + m(j-LB))
B: loc(A[i][j]) = base(A) + W(m(j-LB) + (i-LB))
C: loc(A[j][i]) = base(A) + W(n(I-LB) + m(j-LB))
D: loc(A[i][j]) = base(A) + W((I-LB) + m(j-LB))
Ans: B -
The base address of an array is the address of:
A: A[1]
B: A[n1]
C: A[0]
D: Both A and B
Ans: C