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

SDE - 1

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming , DBMS.
Tip
Tip

Tip 1 : Practice At least 250 Questions
Tip 2 : Ex- Do at least 2 projects

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

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration150 minutes
Interview date10 Sep 2022
Coding problem2

There were 3 sections 
1) Verbal Ability
2) Quantitative and Aptitude
3) Coding round

Easy
20m average time
80% success
0/40
Asked in companies
Urban Company (UrbanClap)Tata Consultancy Services (TCS)MTX

You are given an array ‘arr’ of ‘N’ distinct integers. Your task is to print all the non-empty subsets of the array.

Note: elements inside each subset should be sorted in increasing order. But you can print the subsets in any order, you don’t have to specifically sort them.

 

Problem approach

I have solve this question using Recursion : 

Base condition: If the “index” is equal to the size of the nums array then add our current subset array to the final answer because now we cannot traverse the nums array anymore.
We have two choices now
Skip the current element and call the recursive function with index+1 and all other arguments will remain the same.
Add the current element to the current subset and call the recursive function with index +1 and other arguments. After calling the recursive function, do the backtracking step by removing the last element from the current subset.
Print the final answer.

Try solving now

2. Modular Exponentiation

Easy
15m average time
85% success
0/40
Asked in companies
SamsungPaytm (One97 Communications Limited)Tata Consultancy Services (TCS)

You are given a three integers 'X', 'N', and 'M'. Your task is to find ('X' ^ 'N') % 'M'. A ^ B is defined as A raised to power B and A % C is the remainder when A is divided by C.

Problem approach

The problem was basic. We have to calculate exponents first . then we have to take modulus of that question.
The problem in this question was constraints. That's why TLE chances were higher. That's why fast exponential method is used here.

Try solving now
02
Round
Easy
Face to Face
Duration20 minutes
Interview date21 Sep 2021
Coding problem1

I was asked questions about some DS algo theory questions , from my project , 1 coding problem

1. Rotate Linked List

Moderate
25m average time
65% success
0/80
Asked in companies
Morgan StanleyTata Consultancy Services (TCS)PharmEasy

You are given a linked list having ‘n’ nodes and an integer ‘k’.


You have to rotate the linked list to the right by ‘k’ positions .


Example :
Input: linked list = [1 2 3 4] , k = 2

Output: 3 4 1 2

Explanation:
We have to rotate the given linked list to the right 2 times. After rotating it to the right once it becomes 4->1->2->3. After rotating it to the right again, it becomes 3->4->1->2. 


Problem approach

To rotate the linked list, we need to change the next of kth node to NULL, the next of the last node to the previous head node, and finally, change the head to (k+1)th node. So we need to get hold of three nodes: kth node, (k+1)th node, and last node. 
Traverse the list from the beginning and stop at kth node. Store pointer to kth node. We can get (k+1)th node using kthNode->next. Keep traversing till the end and store a pointer to the last node also. Finally, change pointers as stated above

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
SDE - 1
3 rounds | 5 problems
Interviewed by Tata Consultancy Services (TCS)
1842 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 7 problems
Interviewed by Tata Consultancy Services (TCS)
1283 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Tata Consultancy Services (TCS)
1473 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 7 problems
Interviewed by Tata Consultancy Services (TCS)
1595 views
3 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6240 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Accenture
2487 views
0 comments
0 upvotes