GATE 2015 (Session 3)
65 questions
MCQ 45 · NAT 201-mark 30 · 2-mark 35
Questions 21–25 of 65
Consider a binary tree T that has 200 leaf nodes. Then, the number of nodes in T that have exactly two children are ________.
Answer: 199
Let be the numbers of nodes with 0, 1 and 2 children. The tree has nodes, so it has edges (every node except the root has one edge to its parent).
Counting the same edges from the parents' side, there are edges. So , which gives .
Here (the leaves), so .
Answer: 199
Counting the same edges from the parents' side, there are edges. So , which gives .
Here (the leaves), so .
Answer: 199
Given a hash table T with 25 slots that stores 2000 elements, the load factor for T is ____________.
Answer: 80
Load factor formula and value:
Answer: 80
Answer: 80
In the given matrix , one of the eigenvalues is 1. The eigenvectors corresponding to the eigenvalue 1 are
Answer: (B)
Matrix for λ = 1:
- Row 1 gives y + 2z = 0, so y = 2z
- Row 3 gives x + 2y = 0, so x = 4z
Taking z = 1, the vector is (4, 2, 1).
Answer:
- Row 1 gives y + 2z = 0, so y = 2z
- Row 3 gives x + 2y = 0, so x = 4z
Taking z = 1, the vector is (4, 2, 1).
Answer:
The value of is
Answer: (C)
Take the log of the limit: (the exponential grows much faster).
So .
Answer: 1
So .
Answer: 1
The number of 4 digit numbers having their digits in non-decreasing order (from left to right) constructed by using the digits belonging to the set {1, 2, 3} is____________.
Answer: 15
A number with digits in non-decreasing order is decided once we know how many 1s, 2s and 3s it contains. So we count the solutions of a + b + c = 4 where :
Answer: 15
Answer: 15