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 | 7 Coding problems

Interview preparation journey

expand-icon
Journey
My journey began with a deep yearning to learn and the determination to start from scratch. I recognized that, to accomplish my objectives, I must construct a solid foundation of knowledge and competencies. I began by delving into books and online resources on my areas of interest, such as computer programming, machine learning, and OOP concepts. Furthermore, I enrolled in online courses and attended workshops and seminars to enhance my abilities. As I progressed in my learning, I embarked on personal projects to put my knowledge into practice. I created uncomplicated programs and algorithms and gradually advanced to more intricate undertakings. I also participated in online forums and communities to share my work and collaborate with others in the field. With every new project, I encountered fresh challenges and difficulties. However, I persisted, gaining knowledge from my mistakes and pushing myself to keep improving. As my competencies and understanding increased, I felt more self-assured in my abilities. Eventually, my perseverance paid off, and I received an interview call from a renowned tech firm. I devotedly prepared for the interview, studying the company's products and technologies and honing my coding skills. On the day of the interview, I experienced jitters but was also thrilled for the opportunity to demonstrate my potential. The interview was demanding, but I was able to utilize the skills and knowledge I had gained to respond to the questions and solve the problems presented to me. After the interview, I felt a sense of fulfillment and pride in my accomplishment. However, I also recognized that my journey was far from complete. To remain at the forefront of my field and achieve even more significant accomplishments in the future, I must continue to learn and grow.
Application story
I found a job opening I was interested in through my college's placement cell and was required to submit an application. This may include submitting a resume, cover letter, and other relevant documents or completing an online application form. I made sure that my resume conveyed my knowledge correctly. A resume is a crucial tool in the job application process, as it summarizes a candidate's education, work experience, skills, and achievements. The importance of a well-crafted resume cannot be overstated. After applying, I was contacted for further assessments, which included tests and a coding challenge. Subsequently, I received a call for a technical interview and an HR interview.
Why selected/rejected for the role?
To secure a job, it's crucial to exhibit the skills and expertise needed to carry out the job responsibilities competently. I accomplished this by customizing my resume and cover letter to correspond with the job description, emphasizing pertinent accomplishments and experiences, and highlighting my problem-solving abilities and other applicable skills. Throughout the interview process, I was well-prepared with insightful replies to typical interview questions and asked questions that showcased my passion and interest in the position. Furthermore, I demonstrated professionalism, politeness, and attentiveness during the interview to establish my suitability for the job.
Preparation
Duration: 6 months
Topics: Data structure and algorithms, DBMS, OOPS concept, Computer networking, machine learning
Tip
Tip

Tip 1: Go through the important subjects such as OOPs, DBMS, etc., and apply this knowledge in building new projects.
Tip 2: Make a strong resume.
Tip 3: Solve and practice coding questions as much as possible.

Application process
Where: Campus
Eligibility: No current backlogs
Resume Tip
Resume tip

Tip 1: Highlight your achievements: Instead of just listing your job duties, focus on your accomplishments and how you added value to your previous employers. 

Tip 2: Customize it for the job: Tailor your resume to match the job description and requirements. Highlight the skills and experience that are most relevant to the job you are applying for.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration180 mins
Interview date3 Sep 2022
Coding problem3

The coding and aptitude rounds conducted by the IT company took place in the morning from 9 to 12. The environment was completely virtual, as the candidates were not required to be physically present in a specific location. During the aptitude round, candidates were given a set of MCQs based on various topics. During the coding round, candidates were given a set of coding problems to solve within a specified timeframe. The problems covered a range of topics, such as algorithms, data structures, and programming languages. The coding environment provided by HackerRank included a compiler, debugger, and test cases to help candidates validate their solutions.

1. Reverse Linked List

Moderate
15m average time
85% success
0/80
Asked in companies
CIS - Cyber InfrastructureInfo Edge India (Naukri.com)Cisco

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Problem approach

Initialize three pointers: previous (initialized as None), current (initialized as the head of the linked list), and next_node (initialized as None).
Iterate through the linked list while the current pointer is not None:
a. Store the next node of the current node in the next_node pointer.
b. Point the next reference of the current node to the previous node.
c. Move the previous pointer to the current node.
d. Move the current pointer to the next node (stored in next_node).
After the iteration, update the head of the linked list to the current node (which is the last node of the original list).
Return the new head of the reversed linked list.

Try solving now

2. Second largest element in the array

Easy
15m average time
80% success
0/40
Asked in companies
AdobeTata Consultancy Services (TCS)Samsung

You have been given an array/list 'ARR' of integers. Your task is to find the second largest element present in the 'ARR'.

Note:
a) Duplicate elements may be present.

b) If no such element is present return -1.
Example:
Input: Given a sequence of five numbers 2, 4, 5, 6, 8.

Output:  6

Explanation:
In the given sequence of numbers, number 8 is the largest element, followed by number 6 which is the second-largest element. Hence we return number 6 which is the second-largest element in the sequence.
Problem approach

Initialize two variables, largest and second_largest, both set to negative infinity.
Iterate through the array:
a. If the current element is greater than the largest value, update second_largest to hold the previous value of largest, and update largest with the current element.
b. If the current element is greater than the second_largest value but smaller than largest, update second_largest with the current element.
After iterating through the array, the second_largest variable will hold the second largest element.
Return the value of second_largest.

Try solving now

3. Puzzle

Four people need to cross a bridge at night. They have only one torch, which takes exactly 1 minute to cross the bridge. Only two people can cross the bridge together at a time, and they must have the torch with them. The four people walk at different speeds, and each person takes a different amount of time to cross the bridge: 1 minute, 2 minutes, 5 minutes, and 10 minutes. When two people cross the bridge together, they must move at the slower person's pace.

What is the minimum time required for all four people to cross the bridge?(Learn)

Problem approach

Let's label the four people as A, B, C, and D, with their respective crossing times: 1 minute, 2 minutes, 5 minutes, and 10 minutes.

To minimize the time, we need to pair the two fastest people (A and B) to cross the bridge together first. They take 2 minutes to cross (as B is slower).

After A and B cross, A will return with the torch, which takes 1 minute.

Now, the two slowest people (C and D) need to cross the bridge. D is the slowest, so both C and D will take 10 minutes to cross.

Finally, B (who has already crossed) needs to go back to get the torch. This takes 2 minutes.

The total time taken for all four people to cross the bridge is 2 + 1 + 10 + 2 = 15 minutes.

02
Round
Easy
Video Call
Duration30 mins
Interview date10 Oct 2022
Coding problem4

Introduction: The interview started with a brief introduction session where the interviewer and interviewee introduced themselves. The interviewer asked about my background, education, and relevant experience.

Project Discussion: After the introduction, the interviewer asked me to explain one or more projects mentioned on my resume. I described the project's purpose, its role, and the technologies used. The interviewer may ask detailed questions about the project's implementation, challenges faced, and the outcomes achieved.

Coding Question: Once the project discussion was over, the interviewer presented a coding question to assess my problem-solving and coding skills.

The HR round is typically the final stage of the interview process and focuses on assessing the candidate's suitability for the organization's culture and team dynamics. The round lasted for 30 minutes. It started with an introduction and icebreaker, followed by an overview and resume discussion. Behavioral Questions: The HR representative asked behavioral questions to assess the candidate's problem-solving abilities, interpersonal skills, and decision-making capabilities. Finally, the HR representative provided an opportunity for me to ask any questions I had about the company, team, or role.

1. Find Duplicates In Array

Easy
15m average time
90% success
0/40
Asked in companies
CIS - Cyber InfrastructureTata Consultancy Services (TCS)SAP Labs

You are given an array/list 'ARR' consisting of N integers, which contains elements only in the range 0 to N - 1. Some of the elements may be repeated in 'ARR'. Your task is to find all such duplicate elements.

Note:
1. All the elements are in the range 0 to N - 1.
2. The elements may not be in sorted order.
3. You can return the duplicate elements in any order.
4. If there are no duplicates present then return an empty array.
Problem approach

Create an empty set to keep track of visited numbers.
Iterate through the array:
a. Check if the current number is already in the set. If it is, return the current number as the duplicate.
b. If the current number is not in the set, add it to the set.
If no duplicate is found, return -1 or any appropriate value to indicate the absence of a duplicate.

Try solving now

2. 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

Remove any spaces, punctuation, and convert the string to lowercase to ignore case sensitivity.
Initialize two pointers, left and right, pointing to the start and end of the string, respectively.
Iterate until the left pointer is less than the right pointer:
a. Compare the characters at the left and right pointers.
b. If they are not equal, return False as it is not a palindrome.
c. Move the left pointer one step forward and the right pointer one step backward.
If the loop completes without any mismatched characters, return True as it is a palindrome.

Try solving now

3. OS Question

Explain the concept of virtual memory.(Learn)

Problem approach

Definition: Virtual memory is a memory management technique used by operating systems to provide an illusion of a larger memory space than physically available in the system. It allows programs to operate as if they have access to a large contiguous memory space, even if the physical memory is limited.

Virtual Address Space: The virtual memory is divided into a virtual address space, which is typically larger than the physical memory. Each process has its own virtual address space, which is divided into fixed-sized pages.

Paging: The virtual memory is implemented using a technique called paging. The virtual address space is divided into fixed-sized pages, and the physical memory is divided into fixed-sized page frames. The pages of the virtual address space are mapped to the page frames of the physical memory.

4. DBMS Question

Explain the concept of normalization in database management systems.(Learn)

Problem approach

Definition: Normalization is a process in database design that organizes tables and their attributes to reduce data redundancy and dependency. It ensures that the database is structured efficiently, minimizes data anomalies, and improves data integrity.

Purpose of Normalization: The main purpose of normalization is to eliminate data redundancy and prevent inconsistencies, anomalies, and update anomalies that can occur when data is duplicated across multiple tables.

Normal Forms: Normalization is typically achieved through a series of normal forms, each building on the previous one.

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 | 12 problems
Interviewed by Tata Consultancy Services (TCS)
1286 views
1 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
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