Tech Mahindra interview experience Real time questions & tips from candidates to crack your interview

Associate Software Engineer

Tech Mahindra
upvote
share-icon
5 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Journey
My journey was incredible throughout the process. I started by preparing for each round: aptitude, coding, and technical and HR interviews. I cleared all the rounds in the process and received the offer.
Application story
I applied on campus. The first two rounds (aptitude, CS fundamentals, coding) were offline on the college premises. The third round, Communication Assessment, was online. Then the technical and HR interviews were conducted in the company premises.
Why selected/rejected for the role?
I cleared both rounds that were held on the college campus. I completed both coding questions successfully. Then, I cleared the Communication Assessment. Finally, I went to the company for interviews. First, I cleared the technical interview, and then I proceeded to the HR round. I participated in the interviews with full confidence, and I was selected.
Preparation
Duration: 6 Months
Topics: Data Structures and Algorithms, SQL, Html, CSS, JavaScript, ReactJS
Tip
Tip

Tip 1: Practice at least 150 questions.

Tip 2: Complete at least 2 projects.

Tip 3: Take mock interviews.

Application process
Where: Campus
Eligibility: Minimum 70 % in 10th, 12th and Graduation, not more than one year of gap after 12th.
Resume Tip
Resume tip

Tip 1: Keep the resume simple.

Tip 2: Should have at least two projects.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date5 Feb 2024
Coding problem0

Logical Ability - 12
Quantitative Ability - 12
English -12
Essay Writing - 1

02
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date5 Feb 2024
Coding problem2

Computer Programming -12,
Computer Science -12,
Personality Test - 72

1. Check If The String Is A Palindrome

Easy
10m average time
90% success
0/40
Asked in companies
Tech MahindraHCL TechnologiesMorgan Stanley

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

Step 1: Preprocessing the String

I began by addressing the requirement to ignore spaces, punctuation, and capitalization. To do this, I needed to preprocess the string. I removed all non-alphanumeric characters and converted the remaining characters to lowercase. This ensured that comparisons were made only between relevant characters.

Step 2: Checking for Palindrome

With the preprocessed string ready, the next step was to check if it was a palindrome. A straightforward approach was to compare the string with its reverse.

Step 3: Full Solution Implementation

Combining both steps, I implemented the full solution. Here is the complete function along with an example of usage:

Try solving now

2. Longest Substring Without Repeating Characters

Moderate
20m average time
80% success
0/80
Asked in companies
AmazonWalmartMyntra

Given a string 'S' of length 'L', return the length of the longest substring without repeating characters.

Example:

Suppose given input is "abacb", then the length of the longest substring without repeating characters will be 3 ("acb").
Problem approach

Step 1: Understand the Problem and Plan the Approach

To solve this problem, I decided to use a sliding window approach with two pointers. The idea is to maintain a window that contains no repeating characters and move the window across the string to find the longest such substring.

Step 2: Implement the Sliding Window Technique

I used a set to keep track of characters in the current window and two pointers, left and right, to denote the boundaries of the window. I moved the right pointer to expand the window and added characters to the set. If a duplicate character was found, I moved the left pointer to shrink the window until no duplicates remained.

Step 3: Test the Solution

I tested the function with different input strings to ensure it worked correctly.

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date10 Feb 2024
Coding problem0

Reading and Grammar 20 mins (shared)
Comprehension and listening 20 mins (shared)
Speaking 20 mins (shared)

04
Round
Easy
Face to Face
Duration30 minutes
Interview date21 Feb 2024
Coding problem0

It was a Technical round in which he asked for everything mentioned in the resume.

05
Round
Medium
HR Round
Duration30 minutes
Interview date12 Feb 2024
Coding problem0

In the Hr round, Hr asked some personal questions like my journey and questions related to the projects.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which array operation has O(n) worst-case time complexity?

Choose another skill to practice
Similar interview experiences
company logo
Associate Software Engineer
4 rounds | 4 problems
Interviewed by Tech Mahindra
2730 views
0 comments
0 upvotes
company logo
Associate Software Engineer
2 rounds | 3 problems
Interviewed by Tech Mahindra
0 views
1 comments
0 upvotes
company logo
Associate Software Engineer
4 rounds | 4 problems
Interviewed by Tech Mahindra
0 views
2 comments
0 upvotes
company logo
Associate Software Engineer
5 rounds | 4 problems
Interviewed by Tech Mahindra
1326 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
Associate Software Engineer
2 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
4588 views
1 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 5 problems
Interviewed by Tata Consultancy Services (TCS)
2885 views
2 comments
0 upvotes
company logo
Associate Software Engineer
4 rounds | 5 problems
Interviewed by Accenture
3472 views
0 comments
0 upvotes