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
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Data Structures, Pointers, OOPS, System Design, Networking, Operating System, SDLC
Tip
Tip

Tip 1 : Practice coding questions
Tip 2 : Be logical and confident
Tip 3 : Prepare your resume

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

Tip 1 : Keep it short and well defined
Tip 2 : Highlight your achievements

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date1 Oct 2015
Coding problem2

It was a 90 minutes round consisting of 30 mcqs and 2 coding questions.

1. Valid Parentheses

Easy
10m average time
80% success
0/40
Asked in companies
OracleSwiggyAmerican Express

You're given a string 'S' consisting of "{", "}", "(", ")", "[" and "]" .


Return true if the given string 'S' is balanced, else return false.


For example:
'S' = "{}()".

There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
Problem approach

Declare a character stack S.
Now traverse the expression string exp. 
If the current character is a starting bracket (‘(‘ or ‘{‘ or ‘[‘) then push it to stack.
If the current character is a closing bracket (‘)’ or ‘}’ or ‘]’) then pop from stack and if the popped character is the matching starting bracket then fine else brackets are not balanced.
After complete traversal, if there is some starting bracket left in stack then “not balanced”

Try solving now

2. Merge Two Sorted Linked Lists

Moderate
15m average time
80% success
0/80
Asked in companies
AmazonAppleGoldman Sachs

You are given two sorted linked lists. You have to merge them to produce a combined sorted linked list. You need to return the head of the final linked list.

Note:

The given linked lists may or may not be null.

For example:

If the first list is: 1 -> 4 -> 5 -> NULL and the second list is: 2 -> 3 -> 5 -> NULL

The final list would be: 1 -> 2 -> 3 -> 4 -> 5 -> 5 -> NULL
Problem approach

The strategy here uses a temporary dummy node as the start of the result list. The pointer Tail always points to the last node in the result list, so appending new nodes is easy. 

The dummy node gives the tail something to point to initially when the result list is empty. This dummy node is efficient, since it is only temporary, and it is allocated in the stack. The loop proceeds, removing one node from either ‘a’ or ‘b’, and adding it to the tail. When 

We are done, the result is in dummy.next.

Try solving now
02
Round
Easy
Face to Face
Duration30 minutes
Interview date7 Oct 2016
Coding problem1

30 minutes, face to face interview round, where interviewer asked me about my projects, my technical skills and academics.

1. Trapping Rain Water

Moderate
15m average time
80% success
0/80
Asked in companies
SalesforcePayPalHexaware Technologies

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Problem approach

The idea is to traverse every array element and find the highest bars on the left and right sides. Take the smaller of two heights. The difference between the smaller height and height of the current element is the amount of water that can be stored in this array element.

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