CGI interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

CGI
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2.5 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Solve RS Aggarwal Aptitude and Problem Solving Books.
Tip 2 : Practice Coding questions from prepInsta.
Tip 3 : Worked on communication skills

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Mark skills with Bold letters.
Tip 2 : Mention projects on resume

Interview rounds

01
Round
Medium
Face to Face
Duration50 Minutes
Interview date15 Sep 2022
Coding problem2

1. Minimum Cost Path

Moderate
25m average time
70% success
0/80
Asked in companies
HSBCHCL TechnologiesHCL Technologies

You have been given a matrix of ‘N’ rows and ‘M’ columns filled up with integers. Find the minimum sum that can be obtained from a path which from cell (x,y) and ends at the top left corner (1,1).

From any cell in a row, we can move to the right, down or the down right diagonal cell. So from a particular cell (row, col), we can move to the following three cells:

Down: (row+1,col)
Right: (row, col+1)
Down right diagonal: (row+1, col+1)
Problem approach

Step 1 : I used a queue for Level Order Traversal. 
Step 2 : I used a flag variable which keeps track of alternate levels to reverse the order of the corresponding level traversal.
Step 3 : flag==true implies we have to insert from left to right and flag==false means we have to insert an element from right to left our answer ArrayList.

Try solving now

2. Reverse the String

Easy
15m average time
85% success
0/40
Asked in companies
IBMFacebookAcko

You are given a string 'STR'. The string contains [a-z] [A-Z] [0-9] [special characters]. You have to find the reverse of the string.

For example:

 If the given string is: STR = "abcde". You have to print the string "edcba".
follow up:
Try to solve the problem in O(1) space complexity. 
Problem approach

Step 1 : Create a temporary byte[] of length equal to the length of the input string.
Step 2 : Store the bytes (which we get by using the getBytes() method) in reverse order into the temporary byte[].
Step 3 : Create a new String object using byte[] to store result.

Try solving now
02
Round
Easy
Video Call
Duration30 Minutes
Interview date19 Oct 2022
Coding problem3

1. Reverse Number

Easy
10m average time
90% success
0/40
Asked in companies
Wells FargoProtiumErnst & Young (EY)

Ninja is feeling very bored and wants to try something new. So, he decides to find the reverse of a given number. But he cannot do it on his own and needs your help.

Note:

If a number has trailing zeros, then its reverse will not include them. For e.g., the reverse of 10400 will be 401 instead of 00401.
Problem approach

My Approach
Step 1 : Given a number: 12345
Step 2 : Algorithm to reverse the number.

Try solving now

2. Puzzle

- There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find out their relative speed. At no point you can find out the actual speed of the horse in a race. Find out how many races are required to get the top 3 horses.

Problem approach

Explanation:

s1- The minimum no of races to be held is 7. 
Make group of 5 horses and run 5 races. Suppose five groups are a,b,c,d,e and next alphabet is its individual rank in this group(of 5 horses).for eg. d3 means horse in group d and has rank 3rd in his group. [ 5 RACES DONE ] 
a1 b1 c1 d1 e1 
a2 b2 c2 d2 e2 
a3 b3 c3 d3 e3 
a4 b4 c4 d4 e4 
a5 b5 c5 d5 e5 

s2- Now make a race of (a1,b1,c1,d1,e1).[RACE 6 DONE] suppose result is a1>b1>c1>d1>e1

3. Rectangular Numbers

Moderate
30m average time
70% success
0/80
Asked in companies
QualcommAdobeHSBC

Ninja has a number ‘N’. He wants to print the pattern in such a way that the outer rectangle is of the number ‘N’ and the number goes on decreasing as we move inside the rectangles.

For example, if ‘N’ = 4, then pattern will be:

4 4 4 4 4 4 4 
4 3 3 3 3 3 4 
4 3 2 2 2 3 4 
4 3 2 1 2 3 4 
4 3 2 2 2 3 4 
4 3 3 3 3 3 4 
4 4 4 4 4 4 4 
Problem approach

Step 1 : Print the pattern in such a way that the outer rectangle is of the number ‘N’ and the number goes on decreasing
Step 2 : N=4
Step 3 : Using 2-D array, put 2 loops from i,j.

Try solving now
03
Round
Easy
HR Round
Duration30 Minutes
Interview date29 Sep 2022
Coding problem1

Morning time
 

1. Basic HR Questions

Describe a time when you experienced conflict with a coworker. How did you handle it?
How does this job compare to others you might be interviewing for?
What interests you about this role?
What critical feedback do you most often receive?

Problem approach

Tip 1 : Practice well
Tip 2 : Speak in front of mirror

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
Software Engineer
3 rounds | 16 problems
Interviewed by CGI
1073 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CGI
658 views
0 comments
0 upvotes
company logo
SDE
3 rounds | 7 problems
Interviewed by CGI
696 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by CGI
622 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6261 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2159 views
0 comments
0 upvotes