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

SDE

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: DS algo , OOPS , DP questions , Aptitude , System Design , Operating System.
Tip
Tip

Tip 1 : Practice daily question of DS algorithms 
Tip 2 : Prepare all your projects
Tip 3 : Daily practice of aptitude

Application process
Where: Campus
Eligibility: Above 6.5
Resume Tip
Resume tip

Tip 1 : Resume should contain facts
Tip 2 : Add good projects and add github link to it also

Interview rounds

01
Round
Medium
Online Coding Interview
Duration150 minutes
Interview date10 Aug 2021
Coding problem3

English MCQs
Quant + Aptitude Mcqs
Coding round (60 minutes)

1. Animals And Monsters

Hard
45m average time
50% success
0/120
Asked in companies
Tata Consultancy Services (TCS)IBMD.E.Shaw

Ninja lives in the village and has animal husbandry which consists of various animals like cows, sheep, etc. Ninjas’ village also has animal-eating monsters which eat animals that are not present in the fence of the husbandry. You have given the points array ‘POINTS’ having ‘N’ vertices which denote the coordinates in the X-Y plane of the fence and the coordinates of the animal ‘X’ and ‘Y’. The width of the fence is very large so the points present on the fence are considered to be inside. Find if the given animal is safe from monsters or not.

Try solving now

2. Gold Mine Problem

Moderate
35m average time
70% success
0/80
Asked in companies
Tata Consultancy Services (TCS)Goldman SachsAmazon

You have been given a gold mine represented by a 2-d matrix of size ('N' * 'M') 'N' rows and 'M' columns. Each field/cell in this mine contains a positive integer, the amount of gold in kgs.

Initially, the miner is at the first column but can be at any row.

He can move only right, right up, or right down. That is from a given cell and the miner can move to the cell diagonally up towards the right or right or diagonally down towards the right.

Find out the maximum amount of gold he can collect.

Problem approach

The output contains the following two lines:

The first line contains "Yes" (without quotes) if it is possible to collect both the mines or "No" (without quotes) if you are unable to pick both the mines.
The second line contains the minimum time required to pick both the gold mines.
In the case of "No", do not print the second line.

Constraints

1<=t<=100
2<=n<=100

In the first test case, player 1 will move from (3,2)->(1,1) and the second player will move from (3,4)->(1,4).

In the second test case, player 1 will move from (3,4)->(2,4)->(1,4) and the second player don't move.

Try solving now

3. Split the given array into K sub-arrays

Hard
15m average time
85% success
0/120
Asked in companies
AmazonTata Consultancy Services (TCS)Cognizant

You’re given an array 'arr' of size 'n' and an integer 'k'.

Your task is to split 'arr' into 'k' sub-arrays such that the maximum sum achieved from the 'k' subarrays formed must be the minimum possible.

A subarray is a contiguous part of the array.

Return the minimum possible value of the maximum sum obtained after splitting the array into 'k' partitions.


Example:
Input: ‘arr’ = [1, 1, 2] and ‘k’ = 2 

Output: 2

Explanation: If we want to make two subarrays, there are two possibilities: [[1], [1, 2]] and [[1, 1], [2]]. We can see that the maximum sum of any subarray is minimized in the second case. Hence, the answer is 2, which is the maximum sum of any subarray in [[1, 1], [2]].


Try solving now
02
Round
Easy
Face to Face
Duration20 minutes
Interview date7 Sep 2021
Coding problem2

1. String Palindrome

Easy
0/40
Asked in companies
Paytm (One97 Communications Limited)CIS - Cyber InfrastructureInnovaccer

Given a string, determine if it is a palindrome, considering only alphanumeric characters.

Palindrome
A palindrome is a word, number, phrase, or other sequences of characters which read the same backwards and forwards.
Example:
If the input string happens to be, "malayalam" then as we see that this word can be read the same as forward and backwards, it is said to be a valid palindrome.

The expected output for this example will print, 'true'.

From that being said, you are required to return a boolean value from the function that has been asked to implement.

Problem approach

Our approach will be that we will first convert the string to lowercase. Then, we will take two pointers i pointing to the start of the string and j pointing to the end of the string. Keep incrementing i and decrementing j while i < j and at every step check whether the characters at these pointers are same or not. If not then the string is not a palindrome else it is.

Try solving now

2. Occurrence Of Each Word

Easy
10m average time
90% success
0/40
Asked in companies
BarclaysIBMCoinbase

You are given a string S of words. Your task is to count the occurrence of each word present in the string S. A word is a sequence of one or more non-space characters, and there can be multiple spaces between two words, and also there can be leading or trailing spaces in a string S.

For Example:
For the given string  “what we think we become”

“what”,” think”, and “become” occurs 1 time, and “we” occurs 2 times in the given string.
Problem approach

To count the occurrence of a particular character in a string, the below steps are followed:

1.Start with a string and a particular character whose occurrence shall be counted.
2.Start a loop from 0 to the length of the string.
3.Compare if a particular character of the string equals to the character that is being searched.
4.If the result is true, then increment the value of the counter.

Try solving now
03
Round
Easy
HR Round
Duration10 minutes
Interview date7 Sep 2021
Coding problem1

1. Basic HR Questions

Explain your projects and its relevance.

Where do you see yourself in the next 5 years?

What do you expect working in a company like TCS?

How do you like to spend your free time and what are your hobbies?


 


 


 

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
SDE
2 rounds | 3 problems
Interviewed by Tata Consultancy Services (TCS)
1039 views
0 comments
0 upvotes
company logo
SDE
3 rounds | 6 problems
Interviewed by Tata Consultancy Services (TCS)
1584 views
0 comments
0 upvotes
company logo
SDE
3 rounds | 5 problems
Interviewed by Tata Consultancy Services (TCS)
1003 views
0 comments
0 upvotes
company logo
SDE
2 rounds | 6 problems
Interviewed by Tata Consultancy Services (TCS)
2132 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE
4 rounds | 6 problems
Interviewed by HashedIn
710 views
0 comments
0 upvotes
company logo
SDE
2 rounds | 4 problems
Interviewed by Cognizant
918 views
0 comments
0 upvotes
company logo
SDE
2 rounds | 4 problems
Interviewed by HCL Technologies
989 views
0 comments
0 upvotes