Tata consultancy services Ltd interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Tata consultancy services Ltd
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Arrays,Strings,Graphs,Stack, Queue, OOPS, DP
Tip
Tip

Tip 1 : Practice daily on Leetcode
Tip 2 : Write code on paper

Application process
Where: Campus
Eligibility: 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 Minutes
Interview date6 Mar 2021
Coding problem2

1. Count Inversions

Moderate
40m average time
55% success
0/80
Asked in companies
Hewlett Packard EnterpriseBNY MellonGrab

For a given integer array/list 'ARR' of size 'N' containing all distinct values, find the total number of 'Inversions' that may exist.

An inversion is defined for a pair of integers in the array/list when the following two conditions are met.

A pair ('ARR[i]', 'ARR[j]') is said to be an inversion when:

1. 'ARR[i] > 'ARR[j]' 
2. 'i' < 'j'

Where 'i' and 'j' denote the indices ranging from [0, 'N').
Problem approach

The idea is similar to merge sort, divide the array into two equal or almost equal halves in each step until the base case is reached.
Create a function merge that counts the number of inversions when two halves of the array are merged, create two indices i and j, i is the index for the first half, and j is an index of the second half. if a[i] is greater than a[j], then there are (mid – i) inversions. because left and right subarrays are sorted, so all the remaining elements in left-subarray (a[i+1], a[i+2] … a[mid]) will be greater than a[j].
Create a recursive function to divide the array into halves and find the answer by summing the number of inversions is the first half, the number of inversion in the second half and the number of inversions by merging the two.
The base case of recursion is when there is only one element in the given half.

Try solving now

2. Detect and Remove Loop

Moderate
10m average time
90% success
0/80
Asked in companies
IBMDelhiveryPaytm (One97 Communications Limited)

Given a singly linked list, you have to detect the loop and remove the loop from the linked list, if present. You have to make changes in the given linked list itself and return the updated linked list.

Expected Complexity: Try doing it in O(n) time complexity and O(1) space complexity. Here, n is the number of nodes in the linked list.

Problem approach

Have a visited flag with each node.
Traverse the linked list and keep marking visited nodes.
If you see a visited node again then there is a loop. This solution works in O(n) but requires additional information with each node.
A variation of this solution that doesn't require modification to basic data structure can be implemented using a hash, just store the addresses of visited nodes in a hash and if you see an address that already exists in hash then there is a loop.

Try solving now
02
Round
Easy
Face to Face
Duration50 minutes
Interview date23 Mar 2021
Coding problem2

1. System Design Question

How will you design Library Management system?

2. Maximum activities

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

You are given N activities with their start time Start[] and finish time Finish[]. You need to tell the maximum number of activities a single person can perform.

Note:
A person can only work on a single activity at a time. The start time of one activity can coincide with the end time of another.
Problem approach

Used Greedy approach.

Try solving now
03
Round
Easy
HR Round
Duration30 Minutes
Interview date31 Mar 2021
Coding problem1

1. Basic HR questions

Why TCS?

 Tell me about your projects? 

Toughest situation faced in college?

Here's your problem of the day

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

Skill covered: Programming

Which SQL clause is used to specify the conditions in a query?

Choose another skill to practice
Similar interview experiences
SDE - 1
2 rounds | 3 problems
Interviewed by Tata consultancy services Ltd
0 views
0 comments
0 upvotes
SDE - 1
2 rounds | 2 problems
Interviewed by Tata consultancy services Ltd
1081 views
0 comments
0 upvotes
SDE - 1
2 rounds | 3 problems
Interviewed by Tata consultancy services Ltd
1123 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3266 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Mindtree
12080 views
7 comments
0 upvotes
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7769 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
9797 views
1 comments
0 upvotes