TCS

3.9
i
TCS overall rating is based on 31.6k company reviews, including all divisions and wholly owned subsidiaries.

Subsidiary of Tata Group

We ensure the highest levels of certainty and satisfaction through a deep-set commitment to our clients, comprehensive industry expertise and a global network of innovation and delivery centers. We functi... read more

Is this your company?

Claim Account
Filter interviews by
Designation

Select Designation

Clear

2.3k results found

Interview Rounds

Coding Test

I was interviewed in Sep, 2020.

Interview Questions

  • Q1. Constellation

    Given a matrix ‘UNIVERSE’ with 3 rows and ‘N’ columns, with the characters { # , * , . } and these characters represent a cluster of stars and galaxies in space. Stars are represented by ‘*’ symbol. The ‘.’ symbol represents empty space.

    We define a constellation as a 3x3 matrix which contains stars in the shape of vowels. A group of constellations is defined as a galaxy. Note that a galaxy may contain many stars but they will never be overlapping. Two galaxies are separated by a column of ‘#’.

    Given the ‘UNIVERSE’ matrix, print a string which denotes all the vowels formed by stars and ‘#’ present in the matrix.

    A looks like this :
    . * .
    * * *
    * . *
    
    E looks like this :
    * * *
    * * *
    * * *
    
    I looks like this :
    * * *
    . * .
    * * *
    
    O looks like this :
    * * *
    * . *
    * * *
    
    U looks like this :
    * . *
    * . *
    * * *
    
    Note :
    It is guaranteed that no two constellations are overlapping.
    
    Input format :
    The first line of input contains an integer ‘T’ denoting the number of test cases.
    
    The first line of each test case contains a single integer ‘N’ denoting the number of columns in the matrix.
    
    The next 3 lines of each test case denote the matrix of size 3 rows and ‘N’ columns which denotes the stars and the galaxies. Each line contains ‘N’ space separated characters from the set { ‘#’ , ’*’ , ’.’ }.
    
    Output format :
    For each test case, print a string which contains the shape of vowels and the hashes.
    
    Note :
    You do not need to print anything, it has already been taken care of. Just implement the given function.
    
    Constraints:
    1 <= T <= 50
    3 <= N <= 10^5
    
    Time Limit : 1 sec
    
  • Q2. Game in Space

    Ninja is in space with his super spaceship having unlimited fuel. Ninja initially has a health level ‘H’ and his spaceship has an armour ‘A’. He decides to play a game, where at any instant he can be only on one of the 3 planets: VENUS, MARS or SATURN. At every unit of time, he has to change his location and you can assume he can change his location instantly. Each planet has different effects on health and armour which are :

    Venus: Decreases health by 4, decreases armour by 8.
    Mars: Increases health by 3, increases armour by 2. 
    Saturn: Decreases health by 10, increases armour by 5. 
    

    Now the game will end if either ‘H’ <= 0 or ‘A’ <= 0.

    Your task is to find the maximum time Ninja can survive.

    Note :

    You can choose any of the 3 planets during your first move.
    
    Input format :
    The first line of input contains a single integer T, representing the number of test cases.
    
    Then the T test cases follow.
    
    The first line of every test case contains 2 single space-separated integers representing initial health and initial armour respectively.
    
    Output format :
    For every test case, print a single integer representing the maximum time Ninja can survive.
    
    The output of each test case is printed in a separate line.
    

    Note :

    You don’t have to print anything, it has already been taken care of. Just implement the given function.
    
    Constraints :
    1 <= T <= 10
    1 <= H, A <= 10^3
    
    Where ‘T’ denotes the number of test cases,  ‘H’ is the initial health and ‘A’ is the initial armour.
    
    Time Limit: 1sec
    
  • Q3. Maximize the sum

    You are given two sorted arrays of distinct integers, ‘ARR1’ and ‘ARR2’. If you find a common element in both arrays, you can switch from one array to another.

    Your task is to find a path through the intersections i.e common integers of ‘ARR1’ and ‘ARR2’, that produces maximum sum and return that maximum sum as the answer.

    For example:
    Let ‘ARR1’ = [1, 5, 10, 15, 20]  and ‘ARR2’ = [2, 4, 5, 9, 15]
    In this example, common points are 5, 15.
    
    First, we start with ARR2 and take the sum till 5 (i.e. sum = 11). Then we will switch to ‘ARR1’ at element 10 and take the sum till 15. So sum = 36. Now no element is left in ‘ARR2’ after 15, so we will continue in array 1. Hence sum is 56. And the path is 2 -> 4 -> 5 -> 10 -> 15 -> 20.
    

    array

    Input Format:
    The first line of input contains an integer 'T' which denotes the number of test cases or queries to be run. Then the test cases follow.
    
    The first line of each test case contains two space-separated integers, ‘N’ and ‘M,’ representing the number of elements in ‘ARR1’ and ‘ARR2’.
    
    The second line of each test case contains ‘N’ single space-separated integers denoting the values of ‘ARR1’.
    
    The third line of each test case contains ‘M’ single space-separated integers denoting the values of ‘ARR2’.
    
    Output Format :
    For each test case, print the maximum sum value.
    
    Print the output of each test case in a separate line.
    
    Note:
    You do not need to print anything; it has already been taken care of. Just implement the given function.
    
    Constraints:
    1 <= ‘T’ <= 100
    1 <= ‘N’, ’M’ <= 10^4
    1 <= ‘ARR1[i]’, ‘ARR2[j]’ <= 10^5
    
    Time Limit: 1 second
    
  • Q4. Valid Pairs

    You are given an array 'ARR' of 'N' integers and two integers 'K' and 'M'.

    You need to return true if the given array can be divided into pairs such that the sum of every pair gives remainder 'M' when divided by 'K'. Otherwise, you need to return false.

    For example:

    If the given array is [2, 1, 5, 7] and K = 9 and M = 3. Then you need to return true because we can divide the array into two pairs, i.e (2, 1) and (5, 7) whose sums are 3 and 12, which when divided by 9 gives remainder 3, thus it is possible to divide the given array into pairs.  
    

    Note:

    Every element of the array should contribute to only one pair, i.e if the array is [3, 0, 0] and K = 2 and M = 1, then you need to return false, as element 3 will make a pair with any one of the 0. 
    
    Input format :
    The first line of input contains a single integer 'T', representing the number of test cases or queries to be run. 
    Then the 'T' test cases follow.
    
    The first line of each test case contains an integer 'N' representing the size of the given array.
    
    The second line contains 'N' single space-separated integers representing the elements of the array 'ARR'.
    
    The third line contains two single space-separated integers 'K' and 'M'.
    
    Output Format :
    For each test case, print a single line containing either "True" or "False".
    
    Note:
    You do not need to print anything. It has already been taken care of. Just implement the given function.
    
    Constraint :
    1 <= T <= 10
    1 <= N <= 10 ^ 5
    1 <= ARR[ i ] <= 10 ^ 9
    1 <= K <= 10 ^ 9
    0 <= M < K
    
    Where 'N' is the length of the array, 'ARR[ i ]' denotes the 'ith' element of array 'ARR' and 'K' and 'M' are the given integers.
    
    Time Limit: 1 sec
    
  • Q5. Prime Time Again

    You have been given two integers ‘DAY_HOURS’ and ‘PARTS’. Where ‘DAY_HOURS’ is the number of hours in a day and a day can be divided into ‘PARTS’ equal parts. Your task is to find total instances of equivalent prime groups. Prime group refers to the group of elements (hours) which are prime and measure the same equivalent time since the start of the day.

    For example, if we consider ‘DAY_HOURS’ to be 24 and ‘PARTS’ to be 2, then the day of total 24 hours is divided into 2 parts ( 1 - 12 ) and ( 13 - 24 ). 5 hours in the first part of the day is equivalent to 17, which is 5 hours into the second part of the day. And since 5 and 17 both are prime, they can be considered as a prime group.

    Note:
    1. Day starts with hour 1 and ends with hour  ‘DAY_HOURS’.
    
    2. Each hour of the prime group should be in a different part of the day.
    
    3. If there is no prime group then return zero.
    
    4. ‘DAY_HOURS’ should be divisible by ‘PARTS’, meaning that the number of hours per part (DAY_HOURS/PARTS)  should be a natural number.
    

    Example:

    Let ‘DAY_HOURS’ = 20  and ‘PARTS’ = 2
    
    Hence the view of our day would be in the following format: 
    
    1  2  3  4  5  6  7  8  9 10      -  Part 1
    11 12 13 14 15 16 17 18 19 20     -  Part 2
    
     1-11  Not a prime group because 1 is not prime.
     2-12  Not a prime group because 12 is not prime.
     3-13  Because both 3 and 13 are prime, it is an equivalent prime group.
     4-14  Not a prime group because 4 and 14 are not prime.
     5-15  Not a prime group because 15 is not prime.
     6-16  Not a prime group, because 6 and 16 are not prime.
     7-17  Because both 7 and 17 are prime, it is an equivalent prime group.
     8-18  Not a prime group, because 8 and 18 are, is not prime.
     9-19  Not a prime group because 9 is not prime.
     10-20 Not a prime group because both 10 and 20 are not prime.
    
     Hence there are 2 equivalent prime groups in the above format which are 3-13 and 7-17.
    
    Input format:
    The first line of input contains an integer ‘T’ denoting the number of test cases.
    
    The first and the only line of each test case contains two space-separated integers ‘DAY_HOURS’ and ‘PARTS’. 
    
    Output Format
    The output for each test case contains a single integer denoting the number of instances of equivalent prime groups.
    
    The output of each test case will be printed in a separate line.
    
    Note
    You are not required to print the output, it has already been taken care of. Just implement the function. 
    
    Constraints:
    1 <= T <= 100
    10 <= DAY_HOURS <= 5 * 10^3
    2 <= PARTS <= 10^3
    
    Time Limit: 1 second
    
  • Q6. Prime Time Again

    You have been given two integers ‘DAY_HOURS’ and ‘PARTS’. Where ‘DAY_HOURS’ is the number of hours in a day and a day can be divided into ‘PARTS’ equal parts. Your task is to find total instances of equivalent prime groups. Prime group refers to the group of elements (hours) which are prime and measure the same equivalent time since the start of the day.

    For example, if we consider ‘DAY_HOURS’ to be 24 and ‘PARTS’ to be 2, then the day of total 24 hours is divided into 2 parts ( 1 - 12 ) and ( 13 - 24 ). 5 hours in the first part of the day is equivalent to 17, which is 5 hours into the second part of the day. And since 5 and 17 both are prime, they can be considered as a prime group.

    Note:
    1. Day starts with hour 1 and ends with hour  ‘DAY_HOURS’.
    
    2. Each hour of the prime group should be in a different part of the day.
    
    3. If there is no prime group then return zero.
    
    4. ‘DAY_HOURS’ should be divisible by ‘PARTS’, meaning that the number of hours per part (DAY_HOURS/PARTS)  should be a natural number.
    

    Example:

    Let ‘DAY_HOURS’ = 20  and ‘PARTS’ = 2
    
    Hence the view of our day would be in the following format: 
    
    1  2  3  4  5  6  7  8  9 10      -  Part 1
    11 12 13 14 15 16 17 18 19 20     -  Part 2
    
     1-11  Not a prime group because 1 is not prime.
     2-12  Not a prime group because 12 is not prime.
     3-13  Because both 3 and 13 are prime, it is an equivalent prime group.
     4-14  Not a prime group because 4 and 14 are not prime.
     5-15  Not a prime group because 15 is not prime.
     6-16  Not a prime group, because 6 and 16 are not prime.
     7-17  Because both 7 and 17 are prime, it is an equivalent prime group.
     8-18  Not a prime group, because 8 and 18 are, is not prime.
     9-19  Not a prime group because 9 is not prime.
     10-20 Not a prime group because both 10 and 20 are not prime.
    
     Hence there are 2 equivalent prime groups in the above format which are 3-13 and 7-17.
    
    Input format:
    The first line of input contains an integer ‘T’ denoting the number of test cases.
    
    The first and the only line of each test case contains two space-separated integers ‘DAY_HOURS’ and ‘PARTS’. 
    
    Output Format
    The output for each test case contains a single integer denoting the number of instances of equivalent prime groups.
    
    The output of each test case will be printed in a separate line.
    
    Note
    You are not required to print the output, it has already been taken care of. Just implement the function. 
    
    Constraints:
    1 <= T <= 100
    10 <= DAY_HOURS <= 5 * 10^3
    2 <= PARTS <= 10^3
    
    Time Limit: 1 second
    

Interview details

Professional and academic backgroundI completed Information Technology from DVR & Dr. HS MIC College of Technology. I applied for the job as Assistant System Engineer in HyderabadProposed: Eligibility criteriano criteria
Tata Consultancy Services (TCS) interview Rounds:Round 1
Round type - Online Coding Test
Round duration - 360 Minutes
Round difficulty - Medium
Round description -

There will be 6 coding problems, Each question will have 1hr time
2-easy
2-medium
2-hard
If you solve atleast one problem,you will be qualified


Round 2
Round type - Online Coding Test
Round duration - 30 Minutes
Round difficulty - Easy
Round description -

As this was technical round , they asked me about the coding problems that i solved and asked me to explain.
And they asked some DSA topics , explained.
Then they gave on problem and said to write code for it, then i wrote it.
By this i completed my TR


Round 3
Round type - HR Round
Round duration - 20 Minutes
Round difficulty - Medium
Round description -

Hr round was about basic details about family.
1) Intro of us
2) Background
3) Location that we want(mostly as per TCS Guidelines will be the answer)
4) Will you be comfortable as any place, at any environment...
Documents verifications will be there
 

Tata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - COOPSPythonDSASQLOSWeb TechnologiesTime required to prepare for the interview - 2.5 MonthsInterview preparation tips for other job seekers

Tip 1 : cover all basic topics.
Tip 2 : practice atleast 2 per day in coding from platforms like codingninjas,hackerrank,codechef.
Tip 3 : prefer one language and practice in depth and have idea on syntaxes in all other programming languages.
do mini projects

Application resume tips for other job seekers

Tip 1 : maintain in 2 pages
Tip 2 : needed all your knowledge not your personal details

Final outcome of the interviewSelected
View More
track
4
Graduate Engineer Trainee (Get) interview
track

Interview Rounds

Coding Test

HR

I was interviewed before Nov, 2020.

Interview Questions

  • Q1. Pair Sum

    You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

    Note:

    Each pair should be sorted i.e the first value should be less than or equals to the second value. 
    
    Return the list of pairs sorted in non-decreasing order of their first value. In case if two pairs have the same first value, the pair with a smaller second value should come first.
    
    Input Format:
    The first line of input contains two space-separated integers 'N' and 'S', denoting the size of the input array and the value of 'S'.
    
    The second and last line of input contains 'N' space-separated integers, denoting the elements of the input array: ARR[i] where 0 <= i < 'N'.
    
    Output Format:
    Print 'C' lines, each line contains one pair i.e two space-separated integers, where 'C' denotes the count of pairs having sum equals to given value 'S'.
    
    Note:
    You are not required to print the output, it has already been taken care of. Just implement the function.
    
    Constraints:
    1 <= N <= 10^3
    -10^5 <= ARR[i] <= 10^5
    -2 * 10^5 <= S <= 2 * 10^5
    
    Time Limit: 1 sec
    
  • Q2. Minimum Number of Platform Needed

    You are given the arrival and departure times of N trains at a railway station in a day. You need to find the minimum of platforms required for the railway station such that no train waits i.e No train should wait for the platform to be clear or free.

    Input Format :

    The first line of input contains a single integer T, representing the number of test cases or queries to be run. 
    Then the T test cases follow.
    
    The first line of each test case contains a positive integer N which represents the number of trains that arrive at the railway station in a day.
    
    The Second line of each test case contains N integers denoting the arrival time of all the trains.
    
    The third line of each test case contains N integers denoting the departure time of all the trains.
    
    Output Format :
    For each test case, return the minimum number of platforms required at the railway station such that no train waits.
    
    Note :
    Representation of arrival and departure time will be in HHMM format.
    
    Do not print anything. It has been already taken care of.
    
    Constraints :
    1 <= T <=100
    1 <= N <=1000
    0 <= arrival[i] <= departure[i] <= 2359
    
    Time Limit: 1 sec
    
  • Q3. Minimise Sum

    You are given a matrix of ‘N’ rows and ‘M’ columns and a non-negative integer ‘K’. You have to find the minimum possible sum of all elements in each submatrix after performing most ‘K’ decrements.

    Note:
    You can’t decrease a number below 0.
    
    For example:
    You are given ‘K’ = 5, and matrix 
    ‘mat’ = [[1, 2, 3],
             [4, 0, 5],
             [2 , 7, 4]]
    You can do 3 operations on element 7 and 2 operations on element 5. Then the sum of all submatrices will be 246.
    
    Input Format:
    The first line of input contains a single integer ‘T’, denoting the number of test cases.
    
    The first line of each test case contains three space-separated integers ‘N’, ‘M’, and ‘K’, representing the rows, columns of the matrix, and the given integer.
    
    The following ‘N’ lines of input contain ‘M’ space-separated integers representing the matrix elements.
    
    Output Format:
    For each test case, print a single integer representing the minimum possible sum of all elements in each submatrix. Print the answer in the modulo 10^9 + 7.
    
    Print a single line for each test case.
    
    Constraints:
    1 <= T <= 10
    1 <= N, M <= 500
    0 <= K <= 10^12
    1<= mat[i][j] <= 10^6
    
    Time Limit: 1 sec
    
  • Q4. Chocolate Problem

    Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:

    1. Each student gets at least one packet of chocolate.

    2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

    Example :

    Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)
    

    subsequence

    And chocolates in each packet is : {8, 11, 7, 15, 2}
    
    All possible way to distribute 5 packets of chocolates among 3 students are -
    
    ( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
    ( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’ 
    ( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
    ( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
    ( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
    ( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
    ( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
    ( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
    ( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
    ( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
    
    Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
    
    Input format :
    The first line of input contains an integer ‘T’ denoting the number of test cases.
    The next ‘2*T’ lines represent the ‘T’ test cases.
    
    The first line of each test case contains two space-separated integers ‘N’ denoting the number of packets of chocolate and ‘M’ denotes the number of students. 
    
    The second line of each test case contains ‘N’ space-separated integers denoting the number of chocolate in each of ‘N’ packets.
    
    Output Format :
    For each test case, print the minimum difference of the chocolates contained in the packets distributed to the students.
    
    Note :
    You don't need to print anything, it has already been taken care of. Just implement the given function.
    
    Constraints:
    1 <= T <= 50
    2 <= M <= N <= 10^4
    1 <= CHOCOLATES[i] <= 10^9
    
    
    Time Limit : 1 sec
    
  • Q5. Prime Time Again

    You have been given two integers ‘DAY_HOURS’ and ‘PARTS’. Where ‘DAY_HOURS’ is the number of hours in a day and a day can be divided into ‘PARTS’ equal parts. Your task is to find total instances of equivalent prime groups. Prime group refers to the group of elements (hours) which are prime and measure the same equivalent time since the start of the day.

    For example, if we consider ‘DAY_HOURS’ to be 24 and ‘PARTS’ to be 2, then the day of total 24 hours is divided into 2 parts ( 1 - 12 ) and ( 13 - 24 ). 5 hours in the first part of the day is equivalent to 17, which is 5 hours into the second part of the day. And since 5 and 17 both are prime, they can be considered as a prime group.

    Note:
    1. Day starts with hour 1 and ends with hour  ‘DAY_HOURS’.
    
    2. Each hour of the prime group should be in a different part of the day.
    
    3. If there is no prime group then return zero.
    
    4. ‘DAY_HOURS’ should be divisible by ‘PARTS’, meaning that the number of hours per part (DAY_HOURS/PARTS)  should be a natural number.
    

    Example:

    Let ‘DAY_HOURS’ = 20  and ‘PARTS’ = 2
    
    Hence the view of our day would be in the following format: 
    
    1  2  3  4  5  6  7  8  9 10      -  Part 1
    11 12 13 14 15 16 17 18 19 20     -  Part 2
    
     1-11  Not a prime group because 1 is not prime.
     2-12  Not a prime group because 12 is not prime.
     3-13  Because both 3 and 13 are prime, it is an equivalent prime group.
     4-14  Not a prime group because 4 and 14 are not prime.
     5-15  Not a prime group because 15 is not prime.
     6-16  Not a prime group, because 6 and 16 are not prime.
     7-17  Because both 7 and 17 are prime, it is an equivalent prime group.
     8-18  Not a prime group, because 8 and 18 are, is not prime.
     9-19  Not a prime group because 9 is not prime.
     10-20 Not a prime group because both 10 and 20 are not prime.
    
     Hence there are 2 equivalent prime groups in the above format which are 3-13 and 7-17.
    
    Input format:
    The first line of input contains an integer ‘T’ denoting the number of test cases.
    
    The first and the only line of each test case contains two space-separated integers ‘DAY_HOURS’ and ‘PARTS’. 
    
    Output Format
    The output for each test case contains a single integer denoting the number of instances of equivalent prime groups.
    
    The output of each test case will be printed in a separate line.
    
    Note
    You are not required to print the output, it has already been taken care of. Just implement the function. 
    
    Constraints:
    1 <= T <= 100
    10 <= DAY_HOURS <= 5 * 10^3
    2 <= PARTS <= 10^3
    
    Time Limit: 1 second
    
  • Q6. Constellation

    Given a matrix ‘UNIVERSE’ with 3 rows and ‘N’ columns, with the characters { # , * , . } and these characters represent a cluster of stars and galaxies in space. Stars are represented by ‘*’ symbol. The ‘.’ symbol represents empty space.

    We define a constellation as a 3x3 matrix which contains stars in the shape of vowels. A group of constellations is defined as a galaxy. Note that a galaxy may contain many stars but they will never be overlapping. Two galaxies are separated by a column of ‘#’.

    Given the ‘UNIVERSE’ matrix, print a string which denotes all the vowels formed by stars and ‘#’ present in the matrix.

    A looks like this :
    . * .
    * * *
    * . *
    
    E looks like this :
    * * *
    * * *
    * * *
    
    I looks like this :
    * * *
    . * .
    * * *
    
    O looks like this :
    * * *
    * . *
    * * *
    
    U looks like this :
    * . *
    * . *
    * * *
    
    Note :
    It is guaranteed that no two constellations are overlapping.
    
    Input format :
    The first line of input contains an integer ‘T’ denoting the number of test cases.
    
    The first line of each test case contains a single integer ‘N’ denoting the number of columns in the matrix.
    
    The next 3 lines of each test case denote the matrix of size 3 rows and ‘N’ columns which denotes the stars and the galaxies. Each line contains ‘N’ space separated characters from the set { ‘#’ , ’*’ , ’.’ }.
    
    Output format :
    For each test case, print a string which contains the shape of vowels and the hashes.
    
    Note :
    You do not need to print anything, it has already been taken care of. Just implement the given function.
    
    Constraints:
    1 <= T <= 50
    3 <= N <= 10^5
    
    Time Limit : 1 sec
    
  • Q7. Basic HR Questions

    What are your aspirations.

    What is your biggest achievement.

    Willing to relocate?

    Add Answer Collapse

Interview details

Professional and academic backgroundI applied for the job as Associate Software Engineer in MumbaiProposed: Eligibility criteriaAbove 7 cgpa
Tata Consultancy Services (TCS) interview Rounds:Round 1
Round type - Online Coding Test
Round duration - 360 minutes
Round difficulty - Medium
Round description -

They give you 6 hr. For 6 question but the good part is that you need to complete atleast 1 question and you are good to go.
Round will be cleared only after attempting one question and rest of the questions are for improving your rank.


Round 2
Round type - HR Round
Round duration - 20 Minutes
Round difficulty - Easy
Tata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - Data Structures, Python, Operating System, Algorithms, DBMSTime required to prepare for the interview - 2 MonthsInterview preparation tips for other job seekers

Tip 1 : learn basics
Tip 2 : learn any oops language and practice.
Tip 3 : code as much as you can.

Application resume tips for other job seekers

Tip 1 : short and precise. Upto the point.
Tip 2 : keep few things aside from resume

Final outcome of the interviewSelected
View More
track
1
Assistant System Engineer interview
track
1

Interview Rounds

Coding Test

Video Call

I was interviewed in Nov, 2020.

Interview Questions

  • Q1. Math Problem

    A, B and C can do a piece of work in 20, 30 and 60 days respectively. In how many days can A do the work if he is assisted by B and C on every third day?

    Add Answer Collapse
  • Q2. Most Cost Efficient Car

    You are given the price of ‘Petrol’ cars, the maintenance cost of the car per month, number of kilometers a car runs in one liter, amount of Petrol per liter, and number of kilometers a car can run per month. Similar details are also given for ‘Diesel’ cars.

    Your task is to find which car ( ‘Petrol’ or ‘Diesel’ ) is efficient to use for an exact 6 month period. If your answer is ‘Petrol’ car then print ‘0’, if your answer is ‘Diesel’ car then print ‘1’, if both the cars ( ‘Petrol’ and ‘Diesel’) are efficient then print ‘-1’.

    For example, consider both the cars:

    Price of ‘Petrol’ car = ‘780000’, the maintenance cost of ‘Petrol’ car per month = ‘500’, number of kilometers a ‘Petrol’ car can run in one liter  = ’35’, price of ‘Petrol’ per liter = ‘75’ and number of kilometers a ‘Petrol’ car can run in a month = ‘145’.
    
    Similar details are given for ‘Diesel’ car, price of ‘Diesel’ car = ‘850000’, the maintenance cost of ‘Diesel’ car per month = ‘1000’, number of kilometers a ‘Diesel’ car can run in a one-liter = ’30’, price of ‘Diesel’ per liter = ‘80’ and number of kilometers a ‘Diesel’ car can run in a month = ‘200’.
    
    Then the ‘Petrol’ car will be more efficient, so we will print the integer ‘0’.
    
    Input format:
    The first line of input contains an integer ‘T’ denoting the number of test cases.
    
    The next ‘2*T’ lines represent the ‘T’ test cases.
    
    The first line of each test case contains the 5 space-separated integers which denote the price of a ‘Petrol’ car, maintenance cost of ‘Petrol’ car per month, number of kilometers a ‘Petrol’ car runs in one liter, price of ‘Petrol’ per liter, number of kilometers run a ‘Petrol’ car per month.
    
    The second line of each test case contains the 5 space-separated integers which denote the price of a ‘Diesel’ car, the maintenance cost of ‘Diesel’ car per month, the number of kilometers a ‘Diesel’ car runs in one liter, the price of ‘Diesel’ per liter, number of kilometers run a ‘Diesel’ car per month.
    
    In the main function ‘mostCostEfficientCar’, ‘petrolCar’, ‘dieselCar’ are two objects of ‘Car’ class, and allow to access all parameters (priceOfCar, maintenanceCostPerMonth, numberOfkilemeterCarRunInOneLiter, pricePerLiter, numberOfKilometerCarRunInaMonth) by pointer.
    
    Output Format:
    For each test case, print ‘0’, ‘1’, and ‘-1’ accordingly, if your answer is ‘Petrol’ car then print ‘0’, if your answer is ‘Diesel’ car then print ‘1’, if both the cars ( ‘Petrol’ and ‘Diesel’) are efficient then print ‘-1’.
    
    Note:
    You are not required to print the output explicitly, it has already been taken care of. Just implement the function.
    
    Constraints:
    1 <= T <= 10^5
    1 <= priceOfCar, maintenanceCostPerMonth, numberOfkilemeterCarRunInOneLiter, pricePerLiter, numberOfKilometerCarRunInaMonth <= 10^9
    
    Where ‘T’ is the total number of test cases.
    
    Time Limit: 1 sec
    
  • Q3. Constellation

    Given a matrix ‘UNIVERSE’ with 3 rows and ‘N’ columns, with the characters { # , * , . } and these characters represent a cluster of stars and galaxies in space. Stars are represented by ‘*’ symbol. The ‘.’ symbol represents empty space.

    We define a constellation as a 3x3 matrix which contains stars in the shape of vowels. A group of constellations is defined as a galaxy. Note that a galaxy may contain many stars but they will never be overlapping. Two galaxies are separated by a column of ‘#’.

    Given the ‘UNIVERSE’ matrix, print a string which denotes all the vowels formed by stars and ‘#’ present in the matrix.

    A looks like this :
    . * .
    * * *
    * . *
    
    E looks like this :
    * * *
    * * *
    * * *
    
    I looks like this :
    * * *
    . * .
    * * *
    
    O looks like this :
    * * *
    * . *
    * * *
    
    U looks like this :
    * . *
    * . *
    * * *
    
    Note :
    It is guaranteed that no two constellations are overlapping.
    
    Input format :
    The first line of input contains an integer ‘T’ denoting the number of test cases.
    
    The first line of each test case contains a single integer ‘N’ denoting the number of columns in the matrix.
    
    The next 3 lines of each test case denote the matrix of size 3 rows and ‘N’ columns which denotes the stars and the galaxies. Each line contains ‘N’ space separated characters from the set { ‘#’ , ’*’ , ’.’ }.
    
    Output format :
    For each test case, print a string which contains the shape of vowels and the hashes.
    
    Note :
    You do not need to print anything, it has already been taken care of. Just implement the given function.
    
    Constraints:
    1 <= T <= 50
    3 <= N <= 10^5
    
    Time Limit : 1 sec
    
  • Q4. OOP Questions

    Explain Polymorphism in java and types of polymorphism
    Explain abstract class and interface and the difference between those two.
    difference between method Overloading and method overriding in java.
    Explain method overriding with exception handling.
    Explain method overriding with access specifiers.
    Explain tagged or marker interface in Java.
    Explain Serialization in Java.
    Explain about the collection framework in java.

    Add Answer Collapse
  • Q5. Database Questions

    What is a Data Base?
    Explain Left outer join and inner join.
    What is normalization?
    What are the different normal forms?
    Explain ER model.

    Add Answer Collapse
  • Q6. Word Break II

    You are given a non-empty string S containing no spaces’ and a dictionary of non-empty strings (say the list of words). You are supposed to construct and return all possible sentences after adding spaces in the originally given string ‘S’, such that each word in a sentence exists in the given dictionary.

    Note :

    The same word in the dictionary can be used multiple times to make sentences.
    Assume that the dictionary does not contain duplicate words.
    

    Input format :

    The first line contains an integer ‘T’ denoting the number of test cases. 
    
    Then the 'T' test cases follow.
    
    The first line contains an integer value ‘K’ which denotes the size of the dictionary.
    
    The second line contains ‘K’ non-empty, space separated strings denoting the words of the dictionary.
    
    The third line contains a non-empty string ‘S’.
    

    Output format :

    For each test case, print each possible sentence after adding spaces, in different lines.
    
    The output of each test case is printed in a separate line. 
    
    Note :
    1. You do not need to print anything, it has already been taken care of. Just implement the given function.
    2. The order in which the output sentences are returned does not matter.
    
    Constraints :
    1 <= T <= 10
    1 <= K <= 100
    1 <= | word | <= 16
    1 <= | S | <= 13
    
    where |word| is the length of each word in the dictionary and |S| is the length of the string S.
    
    Time Limit: 1 sec
    
  • Q7. Data Structures Questions

    What is a Data Structure?
    What is a Doubly linked list?
    What are the different tree traversals?

    Add Answer Collapse
  • Q8. General Questions

    The managerial Round started.
    1)Since You travel 1 hour daily to college, how do you utilize the travel time usefully?
    2)Give a time when you were the most stressful?
    3)How do you handle that amount of stress?
    4)Questions were asked About my course on google cloud (mentioned in resume).
    5)Why do you want to join TCS? 
    6) where do u see yourself 5 years down the line?
    7)Imagine you are doing a project and during the review of the project, you couldn't run your project due to compatibility issues. How do you explain this issues to your supervisor or reviewer?

    Add Answer Collapse
  • Q9. Cloud Questions

    Explain Cloud vs Cloud computing in layman terms.
    Tell me about your typical day.
    Do you have any plans for higher studies?
    Ask us if you have any questions.

    Add Answer Collapse

Interview details

Professional and academic backgroundI completed Information Technology from SASTRA Deemed to be University. I applied for the job as System Engineer Specialist in ChennaiProposed: Eligibility criteria7 CGPA
Tata Consultancy Services (TCS) interview Rounds:Round 1
Round type - Online Coding Interview
Round duration - 50 minutes
Round difficulty - Medium
Round description -

Consisted of two parts- Verbal and quantitative aptitude with 1 mark for each correct answer and -0.33 mark for each wrong answer.


Round 2
Round type - Online Coding Test
Round duration - 60 minutes
Round difficulty - Medium
Round description -

Took place at 10 a.m morning.
Consisted of 2 questions which has to solved in 1 hour. First problem had to be solved to view the next question. Both were easy implementation adhoc problems.


Round 3
Round type - Video Call
Round duration - 50 minutes
Round difficulty - Medium
Round description -

Took place at 1 pm at noon and I was very confident. Three interviewers were present- One technical , One managerial and One HR .
Initially, the interviewers introduced themselves and asked me to introduce myself.
Then, I was asked about my project.

Tata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, C++, Java, Operating Systems, Computer Networks, DBMS.Time required to prepare for the interview - 2 monthsInterview preparation tips for other job seekers

Tip 1 : Should be strong in Data structures and Algorithms. 
Tip 2 : Should be proficient Computer Science fundamentals. 
Tip 3 : Try to have good soft skills.

Application resume tips for other job seekers

Tip 1: Should be thorough on all things present in Resume.
Tip 2: Have a minimum of 1 good project in Resume.
Tip 3: Try to keep the resume to 1 page(for freshers) and maximum 2 pages(for experienced).

Final outcome of the interviewSelected
View More
track
1

Jobs at TCS

System Engineer interview
track
5

Interview Rounds

Coding Test

Video Call

HR

I was interviewed in Dec, 2020.

Interview Questions

  • Q1. Jar of Candies

    There is a jar full of candies for sale at a mall counter. Jar has the capacity ‘N’. That is, jar can contain maximum ‘N’ candies when a jar is full. At any point in time jar can not have 0 or fewer candies.

    Given the number ‘K’, the number of candies the customer wants. Your task is to return the candies left in the jar.

    Note:

    If 'K' is greater than 'N', return -1 denoting the invalid order.
    

    For example:

    Given if 'N' = 10, 'K' = 5. Then 5 candies are left in the jar after the event.
    

    Input format:

    The first line of input contains an integer ‘T’ denoting the number of test cases.
    
    The first and the only line of each test case contains two space-separated integers N and K, where ‘N’ is the number of candies in jar and ‘K’ is the number of candies the customer requires.
    

    Output format:

    For each test case, return the candies left in the jar. If the order is invalid return -1.
    
    The output of each test case will be printed in a separate line.
    

    Note:

    You don’t need to print anything; it has already been taken care of. You just need to implement the given function.
    

    Constraints:

    1 <= T <= 5
    1 <= N, K <= 10^4
    
    Time Limit: 1 second
    
  • Q2. Shuffle Two Strings

    You are given three strings “A”, “B” and “C”. Your task is to check whether “C” is formed by an interleaving of A and B. C is said to be interleaving “A” and “B”, if the length of “C” is equal to the sum of the length of A and length of B, all the characters of “A” and “B” are present in “C”, and the order of all these characters remains the same in all three strings.

    For Example:
    If A = “aab”, B = “abc”, C = “aaabbc”
    Here C is an interleaving string of A and B. Because C contains all the characters of A and B and the order of all these characters is also the same in all three strings.
    

    interleaving

    If A = “abc”, B = “def”, C = “abcdefg”
    Here C is not an interleaving string of A and B as neither A nor B contains the character ‘g’.
    
    Input format:
    The first line contains an integer 'T' which denotes the number of test cases or queries to be run. Then, the T test cases follow.
    
    The first and only line of each test case contains three strings A, B, and C each separated by a single space.
    
    Output format:
    For each test, print True, if C is an interleaving string of A and B, otherwise print False 
    
    Output for each test case will be printed in a separate line.
    
    Note:
    You do not need to print anything; it has already been taken care of. Just implement the given function.
    
    Constraints:
    1 <= T <= 100
    1 <= |A|, |B| <= 1000
    1 <= |C| <= 2000
    where |A|, |B|, |C| denotes the length of string A, B and C respectively.   
    All the characters of the strings A, B, and C contain lowercase English letters only.
    
    Time limit: 1 second
    
  • Q3. Diagonal Sum

    Given a Binary Tree of 'N' nodes, find and print a list containing the sums of all the diagonals. When calculating the sum of each diagonal, consider the diagonals from right to left.

    Diagonals of the binary tree are :

    alt-text

    There are three diagonals :

    Diagonal 1 : 8 10 14

    Diagonal 2 : 3 6 7 13

    Diagonal 3 : 1 4

    Example :
    
    For the given binary tree : 
    

    alt-text

    Output : 24 14 2
    
    Explanation: Rightmost diagonal contains elements {5, 10 , 9} its sum is 24, middle diagonal contains elements {6, 3, 5} its sum is 14, leftmost diagonal contains elements {2}. Thus the answer should be “24 14 2”.
    
    Input Format :
    The only line of the test case contains elements in the level order form. The line consists of values of nodes separated by a single space. In case a node is null, we take -1 on its place.
    
    For example, the input for the tree depicted in the below image would be :
    

    alt text

    1
    2 3
    4 -1 5 6
    -1 7 -1 -1 -1 -1
    -1 -1
    

    Explanation :

    Level 1 :
    The root node of the tree is 1
    
    Level 2 :
    Left child of 1 = 2
    Right child of 1 = 3
    
    Level 3 :
    Left child of 2 = 4
    Right child of 2 = null (-1)
    Left child of 3 = 5
    Right child of 3 = 6
    
    Level 4 :
    Left child of 4 = null (-1)
    Right child of 4 = 7
    Left child of 5 = null (-1)
    Right child of 5 = null (-1)
    Left child of 6 = null (-1)
    Right child of 6 = null (-1)
    
    Level 5 :
    Left child of 7 = null (-1)
    Right child of 7 = null (-1)
    
    The first not-null node (of the previous level) is treated as the parent of the first two nodes of the current level. The second not-null node (of the previous level) is treated as the parent node for the next two nodes of the current level and so on.
    The input ends when all nodes at the last level are null (-1).
    
    Note :
    The above format was just to provide clarity on how the input is formed for a given tree. 
    The sequence will be put together in a single line separated by a single space. Hence, for the above-depicted tree, the input will be given as:
    
    1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1
    
    Output Format :
    Print the only line of output will contain a list containing diagonal sums from right diagonal to left diagonal.
    
    Note :
    You are not required to print the output explicitly, it has already been taken care of. Just implement the function.
    
    Constraints :
    0 <= N <= 10^5
    0 <= node.data <= 10^9
    
    Time Limit : 1 sec
    
  • Q4. DBMS Questions

    Write a query for updating an entity in the table as primary entity.
    What is the difference between drop and truncate.

    Add Answer Collapse
  • Q5. Puzzle

    How would you cut a cake in 3 pieces in 3 times ?

  • Q6. Basic HR Questions

    Can you describe your time management skills? 

    What’s your absenteeism record like? 

    Can I trust you with responsibilities?

Interview details

Professional and academic backgroundI completed Information Technology from Cochin University of Science and Technology. I applied for the job as SDE - 1 in BangaloreProposed: Eligibility criteriaAbove 6.75 CGPA and no current backlogs
Tata Consultancy Services (TCS) interview Rounds:Round 1
Round type - Online Coding Interview
Round duration - 150 Minutes
Round difficulty - Medium
Round description -

Timing was 9:00 a.m. to 12:00p.m.
The environment was very user friendly.
No significant activity was observed.
The interviewer was being very friendly and was talking openly just like friends.


Round 2
Round type - Online Coding Test
Round duration - 60 minutes
Round difficulty - Medium
Round description -

Timing was 4:00 p.m. to 5:00 p.m.
Environment was very good.
No other significant activity was seen.
There were no interviewer for this round as this was just a coding round.


Round 3
Round type - Video Call
Round duration - 15 minutes
Round difficulty - Easy
Round description -

Timing was 12:30 p.m. to 12:45 p.m.
Environment was very good.
No other significant activity was monitored.
The interviewer seemed to have been focused on DSA and technical topics.


Round 4
Round type - Video Call
Round duration - 15 minutes
Round difficulty - Easy
Round description -

Timing 1:00 p.m. to 1:20 p.m.
The environment was very good.
No significant activity.
The interviewer was asking questions from the project site which the candidate would we working if selected and also about the working conditions.


Round 5
Round type - HR Round
Round duration - 20 minutes
Round difficulty - Easy
Round description -

Timing was 1:00 p.m. to 1:20 p.m.
The environment was very good and productive.
No other significant activity.
The interviewer was very good.

Tata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - Advanced Data Structures, OOPS, Dynamic Programming, Database Management System, Computer NetworkingTime required to prepare for the interview - 3 MonthsInterview preparation tips for other job seekers

Tip 1 : Practice basic questions of DSA.
Tip 2 : Must have minimum 2 good projects in latest technologies like AI & ML.
Tip 3 : One should know the Sql commands.

Application resume tips for other job seekers

Tip 1 : Do not bluff and write only things which you are completely aware about.
Tip 2 : Internships would be good for resume.

Final outcome of the interviewSelected
View More
track
Digital- System Engineer interview
track
1

Interview Rounds

Coding Test

Video Call

HR

I was interviewed before Sep, 2020.

Interview Questions

  • Q1. Delete alternate nodes

    Given a Singly Linked List of integers, delete all the alternate nodes in the list.

    Example:
    List: 10 -> 20 -> 30 -> 40 -> 50 -> 60 -> null
    Alternate nodes will be:  20, 40, and 60.
    
    Hence after deleting, the list will be:
    Output: 10 -> 30 -> 50 -> null
    
    Note :
    The head of the list will remain the same. Don't need to print or return anything.
    
    Input format :
    The first and the only line of input will contain the elements of the Singly Linked List separated by a single space and terminated by -1.
    
    Output Format :
    The only line of output will contain the updated list elements.
    
    Input Constraints:
    1 <= N <= 10 ^ 6.
    Where N is the size of the Singly Linked List
    
    Time Limit: 1 sec
    
  • Q2. Two Sum

    You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.

    Note:

    We cannot use the element at a given index twice.
    
    Follow Up:
    Try to do this problem in O(N) time complexity. 
    
    Input Format:
    The first line of input contains an integer ‘T’ denoting the number of test cases to run. Then the test case follows.
    
    The first line of each test case contains two single space-separated integers ‘N’ and ‘Target’ denoting the number of elements in an array and the Target, respectively.
    
    The second line of each test case contains ‘N’ single space-separated integers, denoting the elements of the array.
    
    Output Format :
    For each test case, print a single line containing space-separated integers denoting all pairs of elements such that they add up to the target. A pair (a, b) and (b, a) is the same, so you can print it in any order.
    
    Each pair must be printed in a new line. If no valid pair exists, print a pair of (-1, -1). Refer to sample input/output for more clarity.
    

    Note:

    You do not need to print anything; it has already been taken care of. Just implement the given function.
    
    Constraints:
    1 <= T <= 100
    1 <= N <= 5000
    -10 ^ 9 <= TARGET <=10 ^ 9
    -10 ^ 9 <= ARR[i] <=10 ^ 9
    
    Where 'T' denotes the number of test cases, 'N' represents the size of the array, 'TARGET' represents the sum required, and 'ARR[i]' represents array elements.
    
    Time Limit: 1 sec.
    
  • Q3. General Questions

    Tell me something about yourself and tell me about the approaches you used to solve the problems in the contest:

  • Q4. OOPS Questions
    1. In which language do you code?
    2. What are the four pillars of Object-oriented programming?
    3. What is Null pointer exception in java?
    4. What is serialisation and deserialisation in Java?
    5. What is a constructor?
    6. Can you use pointer to swap two numbers without using a third variable?
  • Q5. General Questions

    How has the covid-19 pandemic affected the IT industry?

  • Q6. General Questions

    What is the contribution of the TATA group towards the betterment of our nation?

  • Q7. General Questions
    1. Why TCS?
    2.  Whether I know about the TCS contract or not?
    3.  Whether I wanted to join TCS?

Interview details

Professional and academic backgroundI applied for the job as SDE - 1 in MumbaiProposed: Eligibility criteriaCodeVita
Tata Consultancy Services (TCS) interview Rounds:Round 1
Round type - Online Coding Interview
Round duration - 90 minutes
Round difficulty - Medium
Round description -

CodeVita: CodeVita is an online coding contest that is conducted by TCS every year across the whole world for coders to showcase their programming skills. There are three rounds in CodeVita:

Pre Qualifier: Conducted Online
Qualifier: Conducted Online
Grand Finale: Conducted in India (offline) in TCS centers
In the Pre Qualifier round, there are 6 questions, and if you are able to solve at least 1 question and clear it’s all the test cases, there is a chance that you will get an interview call from TCS. For the safe side try to solve 2 questions or more completely.


Round 2
Round type - Video Call
Round duration - 60 minutes
Round difficulty - Easy
Round description -

We were informed by the TCS a day before the interview about the time of our interview and all. As this year the whole process was online so a bunch of instructions was mentioned by TCS like the internet connectivity, important documents to present, and all. I joined the virtual lobby on time and my slot was from 3:30 PM to 6:30 PM, there were a few more candidates in the virtual lobby, and a lady started to speak. I was the first to give the interview and all other candidates were given different slots by that lady for their interviews.


Round 3
Round type - Video Call
Round duration - 90 minutes
Round difficulty - Easy
Round description -

This interview directly started with questions.

 


Round 4
Round type - HR Round
Round duration - 90 minutes
Round difficulty - Easy
Round description -

First, she introduced herself and then asked me to give my introduction. Then she asked behavorial and general questions.
 

Tata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - C++, Data Structure, Operating System, SQL, Algorithms, System DesignTime required to prepare for the interview - 12 MonthsInterview preparation tips for other job seekers

Tip 1: Practice at least 300 coding questions.
Tip 2: Be confident.
Tip 3: Don't tell lies in interviews.

Application resume tips for other job seekers

Tip 1: Mention some good projects.
Tip 2: Don't put any false things.

Final outcome of the interviewSelected
View More
track
Computer Science Engineer | Data Engineer interview
track

Contribute to the growing community

Don’t worry. You can choose to be anonymous.

Report Interview Advice

What’s wrong with this interview advice?