Tata Consultancy Services (TCS) interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Tata Consultancy Services (TCS)
upvote
share-icon
2 rounds | 6 Coding problems

Interview preparation journey

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

Tip 1 : Practice Atleast 250 Questions
Tip 2 : Ex- Do atleast 2 projects

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

Tip 1 : Get Creative with Words
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Easy
Online Coding Test
Duration60 Minutes
Interview date24 Mar 2022
Coding problem5

- Morning time
- Environment was good.
- No
- Interviewer was good

1. Median In Matrix

Moderate
25m average time
75% success
0/80
Asked in companies
AdobeTata Consultancy Services (TCS)Thought Works

Given a row-wise sorted matrix having N number of rows and M number of columns. Your task is to find the median of the given matrix.

Note :

Assume that the size of the matrix N*M is always odd.
Try solving now

2. Minimum Spanning Tree

Moderate
34m average time
0/80
Asked in companies
AmazonWells FargoMicrosoft

You are given an undirected, connected and weighted graph G(V, E), consisting of V number of vertices (numbered from 0 to V-1) and E number of edges.

Find and print the total weight of the Minimum Spanning Tree (MST) using Kruskal's algorithm.

By definition, a minimum weight spanning tree is a subset of the edges of a connected, edge-weighted undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight.

Try solving now

3. Convert Sorted Array to BST

Easy
15m average time
85% success
0/40
Asked in companies
SnapdealWalmartTata Consultancy Services (TCS)

You have been given a sorted array of length ‘N’. You need to construct a balanced binary search tree from the array. If there can be more than one possible tree, then you can return any.

Note:

1. A balanced binary tree is a binary tree structure in which the left and right subtrees of every node differ in height by no more than 1.

2. A binary search tree is a binary tree data structure, with the following properties
    a. The left subtree of any node contains nodes with value less than the node’s value.
    b. The right subtree of any node contains nodes with values equal to or greater than the node’s value.
    c. Right, and left subtrees are also binary search trees.

Example:

Below tree, is a balanced binary search tree

1

Below tree is not a balanced tree as the height of the left subtree and right subtree of node ‘5’ differs by more than 1. Moreover, the tree is also not a BST as node ‘2’ is less than node ‘3’ but ‘2’ is the right child of ‘3’.

1

Try solving now

4. Balanced parentheses

Moderate
10m average time
90% success
0/80
Asked in companies
CognizantAccenturePayPal

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

For Example :

()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Try solving now

5. Garden Fencing

Hard
40m average time
60% success
0/120
Asked in companies
Goldman SachsTata Consultancy Services (TCS)D.E.Shaw

Ninja owns a garden in the city of Ninjago. To prevent trespassers, he must fence the garden, but he is busy and asked you to help him.

You are given an array ‘Trees’ of size ‘N’ denoting the coordinates of each tree.

You want to impress Ninja by creating a circular fence such that all the trees lie either inside the fence or on the boundary of the fence. To minimize the cost you have to build the smallest possible fence. Find the coordinates of the centre and also find the radius of this circular fence.

Note :
Answers with a relative error of less than or equal to 10 ^ -5 are acceptable.
For Example :
If N = 3 and the trees are present at (0, 0), (1, 0) and (2, 0)
Then building a circle with (0, 0) and (2, 0) as diametric endpoints will result in the formation of the smallest circle enclosing all the trees.
Therefore we will return the centre as (1, 0) and radius equal to 1. 
Try solving now
02
Round
Easy
HR Round
Duration20 Minutes
Interview date9 Jun 2022
Coding problem1

- Morning time
- Environment was good.
- No
- Interviewer was good

1. Basic HR Questions

What interests you about this role? 

What critical feedback do you most often receive? 

What have been your most positive and negative management experiences?

Problem approach

Tip 1 : Go with creative words 
Tip 2 : Communicate in easy way with others

Here's your problem of the day

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

Skill covered: Programming

To make an AI less repetitive in a long paragraph, you should increase:

Choose another skill to practice
Similar interview experiences
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
1640 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 3 problems
Interviewed by Tata Consultancy Services (TCS)
0 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by Tata Consultancy Services (TCS)
1460 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 3 problems
Interviewed by Tata Consultancy Services (TCS)
1091 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
4 rounds | 1 problems
Interviewed by Newgen Software
3195 views
2 comments
0 upvotes
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by HashedIn
2574 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Ernst & Young (EY)
0 views
0 comments
0 upvotes