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

System Engineer

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

Interview preparation journey

expand-icon
Preparation
Duration: 8 months
Topics: Data Structures, OOPS, Algorithms, Operating System , Linux , Cloud Computing.
Tip
Tip

Tip 1 : Practice 5-8 Codes daily
Tip 2 : Thoroughly Prepare for Data Structure and don't miss on any methods.
Tip 3 : Enroll in Online Courses of Coding ninjas if you're new to programming in introductory course or in any domain of Interview Preparation.

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

Tip 1 : Have some projects related to cutting edge technology like AI, ML, Block chain. Try to know it all about your Project.
Tip 2 : Do not lie on your resume. Just mention the things you're confident about and brush up your skills on a periodic basis.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date3 Oct 2020
Coding problem0

Aptitude test was there in this round. MCQ's from Quantitative, Reasoning were there. The difficulty level was moderate and can be solved by anyone having good practice.
The topics from which questions were asked: Time and Distance, Probability , English , Passage.

02
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date4 Dec 2020
Coding problem1

It was at around 11am. There were two descriptive Coding question on the TCS own platform. It was a proctored test.

1. Who Won the Election???

Moderate
30m average time
85% success
0/80
Asked in companies
IBMTata Consultancy Services (TCS)Atlassian

Elections are going on, and there are two candidates A and B, contesting with each other. There is a queue of voters and in this queue, some of them are supporters of A and some of them are supporters of B. Many of them are neutral. The fate of the election will be decided on which side the neutral voters vote. Supporters of A and supporters of B make attempts to win the votes of neutral voters.

The way this can be done is explained below:

1. The voter queue is denoted by three characters, viz {-, A, B}. The ‘-’ denotes neutral candidate, ‘A’ denotes supporter of candidate A and ‘B’ denotes supporter of candidate B.
2. Supporters of A can only move towards the left side of the queue.
3. Supporters of B can only move towards the right side of the queue.
4. Since time is critical, supporters of both A and B will move simultaneously.
5. They both will try and influence the neutral voters by moving in their direction in the queue. If a supporter of A reaches the neutral voter before a supporter of B reaches him, then that neutral voter will become a supporter of candidate A.
6. Similarly, if a supporter of B reaches the neutral voter before supporter of A reaches him, then that neutral voter will become a supporter of candidate B.
7. Finally, if both reach at the same time, the voter will remain neutral. A neutral vote cannot decide the outcome of the election.
8. If finally, the queue has more votes for candidate A, then A wins the election. If B has more votes, then B wins that election. If both have equal votes, then it will be a coalition government.

Your task is to find the outcome of the election.

For Example:
Given string- “B--A-”
              B --->  B  A   <--- A    B
              ----------------------------->
Output - B as B can move towards right only and A can move in left direction only. Thus B has 3 supporters in total while A have only 2 supporters. 

Note:

1. There are no test cases where all votes are neutral.
2. The influenced voters do not move and hence does not have any influence over the neutral voters.
Problem approach

or the Input 14
--AB--AB---A--

Explanation:
For starting positions where there is no opposition from supporter of B, supporter of A can promote in left side of the queue. The voting queue will then look like below:
A A A B - - A B - - - A - -
From 4th place (in voting queue) B supporter is moving towards the right side, simultaneously 7th placed A supporter is also moving towards the left side. Then the voting queue will look like below:
A A A B B A A B - - - A - -
From 8th place B supporter is moving towards the right side, simultaneously 12th placed A supporter is also moving towards the left side. Then the voting queue will look like below:
A A A B B A A B B - A A - -
Since supporters of both A and B will reach the 10th voter at the same time, 10th voter will remain neutral.
Since supporter of A at 12th place cannot move towards right, last 2 voters will not be influenced and remain neutral. Then the voting queue will look like below:
A A A B B A A B B - A A - -
Since all voter have now cast their votes, election results can now be declared.
So final result is: A A A B B A A B B - A A - -
A has 7 votes, B has 4 votes hence, A wins the election.

Try solving now
03
Round
Medium
Face to Face
Duration30 minutes
Interview date14 Oct 2020
Coding problem2

It was at around 1pm. The interviewer was quite friendly. He asked me questions regarding my Projects which I have mentioned on my resume. He then asked few SQL queries, some OOPS concepts and then a few questions on AWS.
He seemed satisfied by my answers. In the same Panel the HR asked me few question regarding Location preferences and how online classes are impacting my studies. I answered

1. Find Second Max salary in Employee table

Problem approach

Tip 1 : Find Second Max salary in Employee table
 

2. Binary Pattern

Easy
10m average time
80% success
0/40
Asked in companies
CognizantSAP LabsTata Consultancy Services (TCS)

You have been given an input integer 'N'. Your task is to print the following binary pattern for it.

Example

Pattern for 'N' = 4

1111
000
11
0

The first line contains 'N' 1s. The next line contains 'N' - 1 0s. Then the next line contains 'N' - 2 1s and so on.

Try solving now

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
System Engineer
3 rounds | 5 problems
Interviewed by Tata Consultancy Services (TCS)
0 views
0 comments
0 upvotes
company logo
System Engineer
4 rounds | 10 problems
Interviewed by Tata Consultancy Services (TCS)
1000 views
0 comments
0 upvotes
company logo
System Engineer
2 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
2957 views
0 comments
0 upvotes
company logo
System Engineer
2 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
330 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
System Engineer
2 rounds | 2 problems
Interviewed by Cognizant
4965 views
5 comments
0 upvotes
company logo
System Engineer
2 rounds | 4 problems
Interviewed by HCL Technologies
1370 views
0 comments
0 upvotes
company logo
System Engineer
2 rounds | 3 problems
Interviewed by Accenture
907 views
0 comments
0 upvotes