Tip 1 : Practice At least 250 Questions of coding
Tip 2 : Do at least 2 application based projects
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.
Tip 3 : Project should clear.
Online assessment consists of :-
Section 1: Pseudocode and coding round
after this section there was english communication based assessment based on passages , jumbled words
section 2: game-based aptitude (not elimination round)
Section 3: Behaviour competency (not elimination round)



Given array/list can contain duplicate elements.
(arr[i],arr[j]) and (arr[j],arr[i]) are considered same.
Follow the steps below to solve the given problem:
Initialize the count variable with 0 which stores the result.
Iterate arr and if the sum of ith and jth [i + 1…..n – 1] element is equal to sum i.e. arr[i] + arr[j] == sum, then increment the count variable.
Return the count.




Algorithm:
Let the array have R rows and C columns. seen[r] denotes that the cell on the r-th row and c-th column was previously visited. Our current position is (r, c), facing direction di, and we want to visit R x C total cells.
As we move through the matrix, our candidate’s next position is (cr, cc). If the candidate is in the bounds of the matrix and unseen, then it becomes our next position; otherwise, our next position is the one after performing a clockwise turn.



Traverse the tree T in preorder fashion. For every visited node in the traversal, see if the subtree rooted with this node is identical to S.
What will be the output of the following code snippet?
#include int foo(int* a, int* b){
int sum = *a + *b; *b = *a;
return *a = sum - *b;}
int main(){ int i = 0, j = 1, k = 2, l;
l = i++ || foo(&j, &k);
printf("%d %d %d %d", i, j, k, l);
return 0;}
Ans : 1 2 1 1
The control in the logical OR goes to the second expression only if the first expression results in FALSE. The function foo() is called because i++ returns 0(post-increment) after incrementing the value of i to 1. The foo() function actually swaps the values of two variables and returns the value of the second parameter. So, values of variables j and k get exchanged and OR expression evaluates to be TRUE.1 2 1 1
Consider the following C function
void swap ( int x, int y ){ int tmp; tmp = x; x = y; y = tmp;}
In order to exchange the values of two variables a and b:a)
Call swap (a, b)b) Call swap (&a, &b)c) swap(a, b) cannot be used as it does not return any valued) swap(a, b) cannot be used as the parameters passed by value
The code will not work because the parameters are passed by value. In order to swap the values of x and y the parameters should be passed with reference. The correct code is: D)
void swap ( int &x, int &y )
{
int tmp;
tmp = x;
x = y;
y = tmp;
}
#includeint main(){for (int x = 10; x >= 0; x--) {int z = x & (x >> 1);if (z)printf("%d ", x);}}
7 6 3
Here, in the given code, >> is the bitwise right shift operator and x>>y => x/(2^y) and & is the bitwise and operator and gives 1 only if both bits are same. Now, for x = 10, (10>=0) z = 10 & (10>>1) => z = 10 & 5 => z=10. Similarly for x= 9, 8, 5, 4, 2, 1 and 0 , z will be zero and for x=7, z will be 3 , for x= 6, z will be 2 and for x=3, z will be 1 for x=7, 6, and 3 z is non zero so the will get printed on the output screen. Hence, we get output as 7 6 3
In this round we were made to play around 3-4 aptitude games.
Digit Game :-
Problem Statement: You’re giving a mathematical statement and you need to create a correct combination of digits, to make LHS = RHS. Note : One Digit may only be used once, in some cases the all the digits may not be available
Deductive Logical Thinking (Geo-Sudo Challenge)
You’re given a 4×4 or 5×5 or 6×6 grid. You’re supposed to find the missing value based on some rules
Decoding Rules
One geometrical shape can only occur once, in any row or any column
Technical round -1 . Questions were asked from Resume and Coding problem were given to solve



Given Pairs = [3,4], [1,2], [2,3].
The length of the maximum chain will be 2. The longest chain is [1,2] -> [3,4].
1. You can select a pair only once.
2. You needn’t use up all the given pairs.
3. You can select pairs in any order.



Arr = 10, 5, 5, 6, 2,
In this array, the triplet {10, 5, 5} is valid triplet because, 5 + 5 = 10.
The elements in the array need not be distinct.
Sort the given array first.
Start fixing the greatest element of three from the back and traverse the array to find the other two numbers which sum up to the third element.
Take two pointers j(from front) and k(initially i-1) to find the smallest of the two number and from i-1 to find the largest of the two remaining numbers
If the addition of both the numbers is still less than A[i], then we need to increase the value of the summation of two numbers, thereby increasing the j pointer, so as to increase the value of A[j] + A[k].
If the addition of both the numbers is more than A[i], then we need to decrease the value of the summation of two numbers, thereby decrease the k pointer so as to decrease the overall value of A[j] + A[k].
What do you know about java frameworks?
What is Java Spring Boot
Java Spring Boot (Spring Boot) is a tool that makes developing web application and microservices with Spring Framework faster and easier through three core capabilities:
What is Race round condition?
Write a Sql querry to differentiate Joins.
What is Garbage collector in JAVA?
What is encapsulation?
Data encapsulation, also known as data hiding, is the mechanism whereby the implementation details of a class are kept hidden from the user.
why you want to join Capgemini
Tell me 2 reasons why we should Hire you
In which technology you want to get your profile in Capgemini
Will u go for Masters??

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?