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

SDE - Intern

Tata Consultancy Services (TCS)
upvote
share-icon
3 rounds | 10 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 algo
Tip 2 : Prepare all your projects
Tip 3 : Daily practice of aptitude
Tip 4 : Practice previous years Company questions

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

Tip 1 : Resume should contains only those skills that you know
Tip 2 : Add good projects and add github link to it also
Tip 3 : Resume should not be too long

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120-180 minutes
Interview date10 Aug 2021
Coding problem3

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

1. MCQ Questions

MCQ’s (15 English MCQ's, 20 Quant + Aptitude MCQ's - 35 MCQ's) 

 


 

2. Top View Of Binary Tree

Moderate
25m average time
70% success
0/80
Asked in companies
Thought WorksSamsung R&D InstituteMicrosoft

You are given a Binary Tree of 'n' nodes.


The Top view of the binary tree is the set of nodes visible when we see the tree from the top.


Find the top view of the given binary tree, from left to right.


Example :
Input: Let the binary tree be:

Example

Output: [10, 4, 2, 1, 3, 6]

Explanation: Consider the vertical lines in the figure. The top view contains the topmost node from each vertical line.
Problem approach

use the two variables, one for vertical distance of current node from the root and another for the depth of the current node from the root. use the vertical distance for indexing. If one node with the same vertical distance comes again, check if depth of new node is lower or higher with respect to the current node with same vertical distance in the map. If depth of new node is lower, then replace it.

Try solving now

3. Pairs with difference K

Moderate
0/80
Asked in companies
AckoAccentureGoldman Sachs

You are given with an array of integers and an integer K. You have to find and print the count of all such pairs which have difference K.

Note: Take absolute difference between the elements of the array.

Problem approach

1) Initialize count as 0
2) Sort all numbers in increasing order.
3) Remove duplicates from array.
4) Do following for each element arr[i]
a) Binary Search for arr[i] + k in subarray from i+1 to n-1.
b) If arr[i] + k found, increment count. 
5) Return count.

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

1. Check If The String Is A Palindrome

Easy
10m average time
90% success
0/40
Asked in companies
SamsungSterlite Technologies LimitedGrab

You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols and whitespaces.

Note :

String 'S' is NOT case sensitive.

Example :

Let S = “c1 O$d@eeD o1c”.
If we ignore the special characters, whitespaces and convert all uppercase letters to lowercase, we get S = “c1odeedo1c”, which is a palindrome. Hence, the given string is also a palindrome.
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. Find prime numbers

Easy
15m average time
80% success
0/40
Asked in companies
AdobeSalesforceDeutsche Bank

You are given a positive integer ‘N’. Your task is to print all prime numbers less than or equal to N.

Note: A prime number is a natural number that is divisible only by 1 and itself. Example - 2, 3, 17, etc.

You can assume that the value of N will always be greater than 1. So, the answer will always exist.

Problem approach

Approach 1:- 
First, take the number N as input.
Then use a for loop to iterate the numbers from 1 to N
Then check for each number to be a prime number. If it is a prime number, print it.

Approach 2 :-
use Sieve of Eratosthenes which is used to get all prime number in a given range and is a very efficient algorithm.

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

1. Basic HR Question

Tell us about yourself and your projects.

 

 

 

 

2. Basic HR Question

Where do you see yourself in next 5 years?

3. Basic HR Question

What do you know about TCS and what are your expectations from the company?

4. Basic HR Question

Tell me your favourite subject and your hobbies.

5. Basic HR Question

One person you admired and why?

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 - Intern
2 rounds | 4 problems
Interviewed by Tata Consultancy Services (TCS)
1603 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 3 problems
Interviewed by Tata Consultancy Services (TCS)
1362 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 4 problems
Interviewed by Tata Consultancy Services (TCS)
1109 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 3 problems
Interviewed by Tata Consultancy Services (TCS)
5200 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Arcesium
3675 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Arcesium
2643 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by BNY Mellon
2320 views
0 comments
0 upvotes