05 August 2023
Check below videos for previous year questions:
Pseudocode Sample Questions:
Game based Aptitude Questions:
Capgemini Technical MCQ's Previous Year Questions
Explanation:
LinkedList is not stored in a contiguous memory location. Each element int the list is spread across the memory and are linked by the pointers in the Node. Thus, whenever a new element needs to be added a separate memory is allocated enough to store both key and the pointer to the next element.
So, memory is not allocated in stack
Answer is option B
Explanation:
Here totally 7 elements are there so loop will work for 7 times.
In bubble sorting after each iteration the largest element will be coming to it’s position.
In the first iteration element 16 will come to last index after 5 swapping
In second iteration 13 will come to it’s place after 4 swapping.
In third iteration 12 will come to it’s place after 3 swapping
In fourth iteration 10 will come to its place after 2 swapping.
In fifth iteration 9 will come to its place after 1 swapping.
By that all elements will be sorted so, further there will not be any swapping
Total number of swapping = 5 + 4 + 3 + 2 + 1 = 15
So answer is option D
Explanation:
Converting the given postfix to infix the equation will be as,
((a+b) - ((c * d) / f)) + g
So answer is option C
Explanation:
Converting the postfix expression to infix we will get the equation as,
( ( 2 + 3 ) * 5 ) * ( 4+ ( 2 + 3 ) )
Solving it we will get the answer as 225. So option B is the answer
Explanation:
Converting this postfix to infix we will get the equation as
(8+4) * (2 + 4 + (2 * 3))
Solving this the answer is 144.
Answer is option A
Explanation:
In binary search tree the elements which is lesser than the root will come as left child and elements greater than the root node will come as the right child.
Height of the tree is the number of nodes from the root to its deepest leaf node. So according to the data given here the tree height will be 5.
Answer is option A
Explanation:
Apart from Graph all others are linear data structure.
Graph and tree are non-linear data structure.
So, answer is option C
Q10) Linked lists are used to implement
1. Stack
2. Queue
3. Trees
A. 1 and 2
B. All 1, 2, and 3
C. 1 and 3
D. 2 and 3
Explanation:
Linked list can be used to implement stack, queue and trees.
Answer is option B
Explanation:
In doubly linked list, it keeps the address of both previous node and next node. So, it provides two links, and is bidirectional in nature
Answer is option B
Explanation:
A strictly binary tree is a binary tree where every parent node has either no child or two children.
If a strictly binary tree has n leaf nodes then the number of nodes will be 2n – 1.
Here n is 8 so number of nodes = 2 * 8 -1 = 15
Answer is option B
Explanation:
The maximum number of nodes for a tree of height n is (2^n)-1
So, here it is (2^6)-1 = 63
Answer is option B
Capgemini Pattern and Syllabus
Capgemini Frequently Asked Questions