Capgemini Datastructures
Capgemini Datastructures
Sno 1
Name SECTION-1
Time 120
Mark 1
Negative 0
Questions – S1
Qno 1
Sno 1
Type Mcq
A ((w + f) - ) +d
B Wc+d*e-
D - *+ddvw
Answer C
Topic
Mark 1
Level 1
Qno 2
Sno 1
Type Mcq
A 0
B 1
C 5
D 3
Answer D
Topic
Mark 1
Level 1
Qno 3
Sno 1
Type Mcq
A Cannot be determined
B 3
C 2
D 0
Answer C
Topic
Mark 1
Level 1
Qno 4
Sno 1
Type Mcq
A 3, 5, 7, 17 ......
B 3, 5, 7, 13, 17.....
D 5, 9, 13, 17.....
Answer D
Topic
Mark 1
Level 1
Qno 5
Questio Which of the following array representations represent a strict but not
n complete binary tree?
Sno 1
Type Mcq
A A, B, C, D, E
B A, B, C, D, E, F, G
D A, B, C, _, _, D, E,
Answer D
Topic
Mark 1
Level 1
Qno 6
Sno 1
Type Mcq
A Only 2
B Neither 1 nor 2
C Both 1 and 2
D Only 1
Answer C
Topic
Mark 1
Level 1
Qno 7
Sno 1
Type Mcq
A 2
B 4
C 16
Answer A
Topic
Mark 1
Level 1
Qno 8
Sno 1
Type Mcq
Answer A
Topic
Mark 1
Level 1
Qno 9
Sno 1
Type Mcq
Answer B
Topic
Mark 1
Level 1
Qno 10
Henry wants to search an element is the array using jump search. The
Questio optimal size of a block to be jumped is _____________.
n
(It is given that n is the number of elements)
Sno 1
Type Mcq
A Cube root(n)
B n/2
C Sqrt(n)
D N
Answer C
Topic
Mark 1
Level 1
Qno 11
Sno 1
Type Mcq
Answer A
Topic
Mark 1
Level 2
Qno 12
Sno 1
Type Mcq
A O(loglogn)
B O(logn)
C O(1)
D O(101)
Answer D
Topic
Mark 1
Level 2
Qno 13
Consider an array P containing n elements. While sort, an array named
Questio “Count” is created, that stores the count of each element. The count
n array looks like – {2, 2, 2, 2, 5, 7, 10}
Find the value of n.
Sno 1
Type Mcq
A 20
B 10
C 30
Answer C
Topic
Mark 1
Level 2
Qno 14
Sno 1
Type Mcq
Answer C
Topic
Mark 1
Level 2
Qno 15
Sno 1
Type Mcq
A 50
B 45
C 999
D 1049
Answer C
Topic
Mark 1
Level 2
Qno 16
Sno 1
Type Mcq
A 16
B 18
C 9
Answer C
Topic
Mark 1
Level 2
Qno 17
Sno 1
Type Mcq
A 11 17 12 14 15 18
B 11 14 17 12 15 18
C 11 15 17 14 12 18
D 11 12 17 14 15 18
Answer D
Topic
Mark 1
Level 2
Qno 18
Sno 1
Type Mcq
Answer D
Topic
Mark 1
Level 2
Qno 19
Questio Consider a complete binary tree in which the parent node is stored at
n index I. What will be the index of left child of the parent node?
Sno 1
Type Mcq
A 2*|-1
B 2*|+1
C 2*|+2
D 2*|-2
Answer A
Topic
Mark 1
Level 2
Qno 20
Sno 1
Type Mcq
Answer C
Topic
Mark 1
Level 2
Qno 21
Questio
n
Sno 1
Type Mcq
A 8-4-2-1-9-5-6-7-3
B 8-4-2-1-9-5-3-6-7
C 1-2-3-4-5-6-7-8-9
D 8-4-2-9-5-6-7-3-1
Answer D
Topic
Mark 1
Level 3
Qno 22
Find out the sum of the degree of vertices in the pseudo graph as
shown in the image.
Questio
n
Sno 1
Type Mcq
A 24
B 20
C 28
D 22
Answer D
Topic
Mark 1
Level 3
Qno 23
Sno 1
Type Mcq
A 15 17 11 14 18 12
B 15 14 18 17 12 11
C 15 18 14 17 12 11
D 15 12 14 17 11 18
Answer C
Topic
Mark 1
Level 3
Qno 24
Suppose there is a 1-D array Arr[20] with the lower bound as 1 and
Questio
starting base address as 99. Find the address of Arr[6] if the size of
n
each element
Sno 1
Type Mcq
A 117
B 114
C 99
D 111
Answer B
Topic
Mark 1
Level 3
Qno 25
Sno 1
Type Mcq
101
A 010
100
111
B 111
111
011
C 101
110
011
D 110
100
Answer B
Topic
Mark 1
Level 3
Qno 26
Sno 1
Type Mcq
A Max heap
B Unique heap
D Min heap
Answer A
Topic
Mark 1
Level 3
Qno 27
Questio James is using heap sort to sort an array in increasing order. What is
n the overall time complexity of the sorting technique used by him?
Sno 1
Type Mcq
A logn
B n*n
C nlogn
D n
Answer C
Topic
Mark 1
Level 3
Qno 28
Sno 1
Type Mcq
A Only 2
B Both 1 and 2
C Only 1
D Neither 1 nor 2
Answer B
Topic
Mark 1
Level 3
Qno 29
Sno 1
Type Mcq
A Only 2
D Only 1
Answer B
Topic
Mark 1
Level 3
Qno 30
Suppose there is a 1-D array Arr[20] with the lower bound as 1 and
Questio
starting base address as 60. Find the address of Arr[3] if the size of
n
each elements is 4.
Sno 1
Type Mcq
A 63
B 72
C 68
D 64
Answer C
Topic
Mark 1
Level 3
Qno 31
Sno 1
Type Mcq
A 173
B 172
C 177
D 73
Answer D
Topic
Mark 1
Level 1
Qno 32
Sno 1
Type Mcq
A rd–p/s+
B ((a * t) + p) – n
C +/-avfe
Answer C
Topic
Mark 1
Level 1
Qno 33
1. Binary search
Questio
2. Fibonacci search
n
Which of the above searching technique divides the array into unequal
parts?
Sno 1
Type Mcq
A Only 1
B Neither 1 nor 2
C Both 1 and 2
D Only 2
Answer A
Topic
Mark 1
Level 1
Qno 34
Sno 1
Type Mcq
Answer C
Topic
Mark 1
Level 1
Qno 35
Sno 1
Type Mcq
A 3
B 1
C 4
D 2
Answer D
Topic
Mark 1
Level 1
Qno 36
If you are writing code to find the length of a linked list, then which of
Questio
the following values should you provide for the temp pointer to
n
terminate the program?
Sno 1
Type Mcq
D Null
Answer D
Topic
Mark 1
Level 1
Qno 37
Type Mcq
Answer
Topic
Mark 1
Level 1
Qno 38
Sno 1
Type Mcq
A 3
B 1
C 4
D 2
Answer D
Topic
Mark 1
Level 1
Qno 39
If you are writing code to find the length of a linked list, then which of
Questio
the following values should you provide for the temp pointer to
n
terminate the program?
Sno 1
Type Mcq
D Null
Answer D
Topic
Mark 1
Level 1
Qno 40
Sno 1
Type Mcq
A 73 sec
B 70 sec
C 72 sec
D 71 sec
Answer A
Topic
Mark 1
Level 1
Qno 41
Sno 1
Type Mcq
A 1
B 3
C 0
D 2
Answer C
Topic
Mark 1
Level 2
Qno 42
Sno 1
Type Mcq
A The number of the nodes is always odd
Answer A
Topic
Mark 1
Level 2
Qno 43
A = {1, 3, 5}
Questio
B= {2, 0}
n
A new array is formed by joining two arrays. Sorting is done on the new
array. What will be the last second element in the new array?
Sno 1
Type Mcq
A 0
B 1
C 5
D 3
Answer D
Topic
Mark 1
Level 2
Qno 44
Sno 1
Type Mcq
A Cannot be determined
B 3
C 2
D 0
Answer C
Topic
Mark 1
Level 2
Qno 45
Sno 1
Type Mcq
A 5
B 2
C 6
D 3
Answer B
Topic
Mark 1
Level 2
Qno 46
Sno 1
Type Mcq
A 200
Answer A
Topic
Mark 1
Level 2