Coforge pvt. Ltd. interview experience Real time questions & tips from candidates to crack your interview

Senior Software Engineer

Coforge pvt. Ltd.
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
When I was in college, right from my first year, we were told to do coding to bag internships. Therefore, I started with basic coding in C++ when I was in first year. Then I took a DSA course from Coding Ninjas and practised well from it. I was able to solve most of the difficult questions by then. I also did Interview Bit 2 months before applying for interviews.
Application story
I applied in the off-campus placement process. The company's employee shared the google form with me and I have mentioned all the required info and submitted that form. Later on, I was shortlisted on the basis of resume and coding test.
Why selected/rejected for the role?
I was selected because I was able to give optimised approach to almost all of the coding problems. I felt I was upto mark and fit for their role.
Preparation
Duration: 3 months
Topics: DSA, CS FUNDAMENTALS, WEB CONCEPTS, OOPS, SYSTEM DESIGN
Tip
Tip

Tip 1 : Take your time before directly jumping onto the solution even if you have done the code already, it might be possible that interviewer would add any constraints of his own choice.

Tip 2 : Speak out loud, that's very important. If you are stuck onto something in between the interview, don't just sit idle or give up. Talk to your interviewer, let him/her know what's going in your mind, what approach are you trying to implement. The interviewer is your only friend in that room. 

Tip 3 : Don't worry if you haven't been into Competitive Programming before, you can still crack a lot of companies with decent DSA skills, projects are add on.

Tip 4 : For preparation, go through coding ninja's course thoroughly. It's very likely to encounter same questions that are already in the course itself. Common problems like, stock span, balanced parentheses, edit distance-DP, etc.

Tip 5 : Don't panic on seeing a question that you haven't done before. Try to break the given problem into small problems first just like we do in DP, it will surely help you out in building logic if not solution.

Application process
Where: Referral
Eligibility: 7.5 and above
Resume Tip
Resume tip

Tip 1 : Take a nice template for resume, you can even refer sites like novoresume.com. It has got good templates, just pick any with no fancy fonts and colors. Keep it simple.

Tip 2 : Be very specific. Write out important stuff only if you applying for a tech job. No one's going to see your dance/acting skills while interviewing you.

Tip 3 : If you have mentioned your projects, make sure you add your source code's link/github repo link as hyperlink to it. That's very important, it helps interviewer know that you have done this project and you're not faking it.

Interview rounds

01
Round
Easy
Video Call
Duration60 mins
Interview date8 Feb 2022
Coding problem2

1. Level Order Traversal

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

You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.

For example:
For the given binary tree

Example

The level order traversal will be {1,2,3,4,5,6,7}.
Problem approach

Again i had already done this question in the course itself so it was a cake walk for me.
Solution:
Step 1: Create an empty queue which accepts BinaryTreeNode.
Step 2: Put root of the binary tree in the queue.
Step 3: Loop while queue is not empty
3a. store the current size of the queue which will help us know how many nodes are there which needs to be printed at one level.
3b. Dequeue the first node from the queue.
3c. Print it's data.
3d. If the dequeued node has left or right child, enqueue it to the queue.
3e. Print a line as we move to next level.

Try solving now

2. Technical Questions

What is a basic form of GRANT statement?

Calculate the result of the following prefix expression: +,-,*,8,4,/,6,2,5

If a new node is added into a red-black tree, which statements are true ?

What is the complexity of enqueue and dequeue operation in a queue?

02
Round
Medium
Video Call
Duration70 mins
Interview date9 Feb 2022
Coding problem2

1. Kth ancestor of a node in binary tree

Hard
50m average time
35% success
0/120
Asked in companies
Goldman SachsHCL TechnologiesHCL Technologies

You are given an arbitrary binary tree consisting of N nodes numbered from 1 to N, an integer 'K', and a node 'TARGET_NODE_VAL' from the tree. You need to find the Kth ancestor of the node 'TARGET_NODE_VAL'. If there is no such ancestor, then print -1.

The Kth ancestor of a node in a binary tree is the Kth node in the path going up from the given node to the root of the tree. Refer to sample test cases for further explanation.

Note:
1. The given node 'TARGET_NODE_VAL' is always present in the tree.
2. The value of each node in the tree is unique.
3. Notice that the Kth ancestor node if present will always be unique.
Problem approach

I solved this question recursively.
Step 1: Find the given node in the tree.
Step 2: If node not found then simply return null, else check if K is greater than 0, if yes that means we haven't found the Kth ancestor, so we decrement the value of K.
Also we check if K value is 0 then we have found Kth ancestor, and we print it and return null and with base case if root == null, we return.

Try solving now

2. Equilibrium Index

Easy
0/40
Asked in companies
Expedia GroupCoinbaseGoldman Sachs

You are given an array Arr consisting of N integers. You need to find the equilibrium index of the array.

An index is considered as an equilibrium index if the sum of elements of the array to the left of that index is equal to the sum of elements to the right of it.

Note:

1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.
Problem approach

I applied Binary search to solve this coding problem

Try solving now
03
Round
Easy
Video Call
Duration90 mins
Interview date9 Feb 2022
Coding problem2

1. Reverse linked list

Moderate
15m average time
85% success
0/80
Asked in companies
IBMQuikrMicrosoft

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Problem approach

Simple recursive approach

Try solving now

2. Convert Bst To The Greater Sum Tree

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

You have been given a Binary Search Tree of integers. You are supposed to convert it to a greater sum tree such that the value of every node in the given BST is replaced with the sum of the values of all the nodes which are greater than the value of the current node in the tree.

A Binary Search Tree is a tree, whose internal nodes each store a value greater than all the values in the node's left subtree and less than those in its right subtree.

Note :

You need to modify the given tree only. You are not allowed to create a new tree.
For example:
For the given binary search tree

Example

11 will be replaced by {15 + 29 + 35 + 40}, i.e. 119.
2 will be replaced by {7 + 11 + 15 + 29 + 35 + 40}, i.e. 137.
29 will be replaced by {35 + 40}, i.e. 75.
1 will be replaced by {2 + 7 + 11 + 15 + 29 + 35 + 40}, i.e. 139.
7 will be replaced by {11 + 15 + 29 + 35 + 40}, i.e. 130.
15 will be replaced by {15 + 29 + 35 + 40}, i.e. 104.
40 will be replaced by 0 {as there is no node with a value greater than 40}.
35 will be replaced by {40}, i.e. 40.
Problem approach

Step 1: I made a helper function where i passed the root node and 0 which worked as the sum in it.
Step 2: Made a base case, if root is null, return.
Step 3: Went to the rightmost node of the tree as the rightmost node is the only node which will have highest value in whole BST.
Step 4: Added the root's data to the sum variable which was passed in the helper function.
Step 5: After adding the root's sum with the sum variable, update the current root data with that sum.
Step 6: Call recursively on left side of the tree by sending root.left as root node and updated sum in helper function.

Try solving now
04
Round
Medium
Video Call
Duration40 mins
Interview date9 Feb 2022
Coding problem1

System design round

1. System Design

Design Disney+ Hotstar with proper flow diagram and patterns.

Problem approach

Tip 1. Ask clarifying questions. Specify all requirements to understand what exactly your design should do.
Tip 2. Scope business requirements. 
Tip 3. Do estimations.
Tip 4. Start with as simple design as possible.
Tip 5. Now scale up and iterate
Tip 6. Think about the extra details of your system.

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
SDE - 1
3 rounds | 4 problems
Interviewed by Coforge pvt. Ltd.
1742 views
0 comments
0 upvotes
SDE - 1
2 rounds | 2 problems
Interviewed by Coforge pvt. Ltd.
882 views
0 comments
0 upvotes
Graduate Engineer Trainee
3 rounds | 4 problems
Interviewed by Coforge pvt. Ltd.
909 views
0 comments
0 upvotes
Graduate Engineer Trainee
3 rounds | 4 problems
Interviewed by Coforge pvt. Ltd.
251 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Senior Software Engineer
1 rounds | 6 problems
Interviewed by Arcesium
3734 views
0 comments
0 upvotes
company logo
Senior Software Engineer
3 rounds | 3 problems
Interviewed by Ernst & Young (EY)
4983 views
0 comments
0 upvotes
company logo
Senior Software Engineer
3 rounds | 3 problems
Interviewed by HCL Technologies
3013 views
3 comments
0 upvotes