Skip to content

Tech Mahindra Interview Questions and Answers (2026)

Tech Mahindra runs a fairly standard four-stage IT-services loop, but its aptitude test carries negative marking - unlike comparable NQT-style tests at TCS and Wipro - which changes how you should approach the screening round.

Tech Mahindra interview process at a glance

Section titled “Tech Mahindra interview process at a glance”
Round Duration What they test
Online Aptitude Test ~50 min Quantitative, logical reasoning, verbal ability (negative marking)
Technical Assessment Varies Linux basics, DSA fundamentals, testing methodology, SQL
Technical Interview 15-45 min Basic coding, OOPs, project discussion
HR Interview 20-30 min Fit, relocation, shifts, client-handling scenarios

A roughly 50-minute, ~75-question test covering quantitative aptitude, logical reasoning, and verbal ability. Unlike TCS’s NQT or Wipro’s NLTH, this section has confirmed negative marking, so accuracy matters more than attempting every question.

Common questions

  • Quantitative - percentages, ratios, time and work
  • Logical reasoning - series completion, coding-decoding
  • Verbal ability - reading comprehension, error spotting, sentence completion

A mixed technical/personality screen that goes a bit broader than a pure coding test - Linux fundamentals and software-testing methodology show up alongside standard DSA and SQL, reflecting Tech Mahindra’s enterprise-support and infrastructure-heavy project mix.

Common questions

  • Basic Linux commands and file-permission concepts
  • DSA fundamentals - arrays, strings, basic complexity analysis
  • Software-testing methodology - types of testing, test-case basics
  • SQL - GROUP BY/joins for a max-salary-per-department style query

Round-by-round breakdowns are on the Tech Mahindra interview experience page.

A 15-45 minute round (length varies more than at most peers) covering basic coding, OOPs, and a project deep-dive. Interviewers weight approach and clear explanation over polished syntax.

Common questions

  • Palindrome check; Fibonacci via recursion
  • Reverse a linked list; character-frequency count using a hashmap
  • OOPs concepts explained in plain language
  • Detailed project discussion - stack choice, hardest bug, what you’d rebuild

Standard fit and logistics questions, with a client-handling scenario showing up more often than at pure-product companies, given how much of Tech Mahindra’s work is telecom and enterprise client support.

Common questions

  • Why Tech Mahindra?
  • Are you comfortable with rotational or night shifts and 24/7 support work?
  • Tell me about a time you handled a difficult client or customer issue
  • Where do you see yourself in a few years?

Sample answer frameworks for each of these are on the Tech Mahindra HR interview questions page.

Common technical interview questions and answers

Section titled “Common technical interview questions and answers”
Q: Write a program to check whether a string is a palindrome.

Use two indices, one at each end, comparing the characters and moving inward while the left index is less than the right; return false on the first mismatch and true if the pointers cross. That is O(n) time and O(1) extra space, better than reversing the string into a new buffer, which costs O(n) space. Clarify the requirements before coding - whether to ignore case, whether to skip non-alphanumeric characters, and how to treat an empty string, which is conventionally a palindrome. The cleaned variant simply advances each pointer past non-alphanumeric characters before comparing lowercased values.

Q: How would you compute the nth Fibonacci number, and what is the complexity of each approach?

Naive recursion returning fib(n-1) plus fib(n-2) recomputes the same subproblems and costs exponential time, roughly O(1.618 to the power n), with O(n) stack depth - it is what interviewers want you to reject. Memoising the results into an array reduces it to O(n) time and O(n) space. The iterative bottom-up version keeps only the last two values, so it is O(n) time and O(1) space, which is the answer to give. Mention that the values overflow a 32-bit int around n equal to 47, so you need a 64-bit type or big integers, and that matrix exponentiation gets it to O(log n) if pressed.

Q: Reverse a singly linked list iteratively.

Keep three pointers - previous initialised to null, current initialised to the head, and a temporary next. In each iteration store current.next in next, point current.next at previous, move previous to current, and move current to next, looping until current is null; then return previous as the new head. It runs in O(n) time with O(1) space in a single pass. The recursive version is elegant but costs O(n) stack space and risks a stack overflow on a long list. The mistake to avoid is reassigning current.next before saving it, which loses the rest of the list immediately.

Q: Write a SQL query to find the highest-paid employee in each department.

The window-function form is clearest: SELECT dept_id, name, salary FROM (SELECT dept_id, name, salary, RANK() OVER (PARTITION BY dept_id ORDER BY salary DESC) AS rnk FROM employees) t WHERE rnk = 1. RANK returns every tied top earner, whereas ROW_NUMBER would arbitrarily pick one - state which behaviour you want. Without window functions, join the table to a grouped subquery: SELECT e.dept_id, e.name, e.salary FROM employees e JOIN (SELECT dept_id, MAX(salary) AS m FROM employees GROUP BY dept_id) d ON d.dept_id = e.dept_id AND d.m = e.salary. Selecting a name alongside a bare MAX without grouping or joining is the classic wrong answer, because the name is not functionally determined by the group.

Q: What does chmod 755 mean, and how do Linux file permissions work?

Each file carries three permission triplets - owner, group, and others - each holding read, write, and execute bits worth 4, 2, and 1 respectively. 755 therefore grants the owner read, write, and execute (4 plus 2 plus 1), and grants group and others read and execute (4 plus 1), which is the normal mode for a directory or a script that everyone may run but only the owner may modify. On a directory the bits mean something different: read lists names, write creates and deletes entries, and execute permits traversing into it, so a directory with read but not execute is nearly useless. 644 is the usual mode for a plain data file, and chmod +x adds the execute bit for every triplet subject to the umask.

Q: What are the main types of software testing, and how do smoke and sanity testing differ?

Unit tests exercise a single function or class in isolation with dependencies mocked; integration tests check that two or more components work together, typically hitting a real database or API; system tests validate the complete application against requirements; and acceptance tests confirm it meets the user’s or client’s stated needs. Regression testing re-runs existing tests after any change to confirm nothing previously working broke. Smoke testing is a shallow, wide pass over the critical paths of a new build to decide whether it is stable enough to test at all, whereas sanity testing is a narrow, deep check that one specific fix or feature behaves correctly after a minor change. Black-box testing works from the specification, white-box from the code and its branch coverage.

Q: Explain the four pillars of object-oriented programming with examples.

Encapsulation bundles data with the methods that operate on it and restricts direct access - a BankAccount keeps balance private and exposes deposit and withdraw so no caller can set a negative balance. Abstraction exposes only the essential contract, so a Vehicle interface declares start() and callers never see the ignition mechanism. Inheritance lets a Car reuse and specialise Vehicle’s behaviour, expressing an is-a relationship. Polymorphism lets one reference behave differently by type - overriding gives run-time polymorphism through a base reference, overloading gives compile-time selection by signature. The follow-up worth pre-empting is why composition is usually preferred over deep inheritance: inheritance couples the subclass to the parent’s implementation, so a change upstream breaks everything below it.

Q: Count the frequency of each character in a string.

Iterate the string once and increment a counter per character in a hash map, or in an int array of size 26 or 256 when the alphabet is fixed, which avoids hashing overhead entirely. That is O(n) time and O(k) space where k is the alphabet size. To report the most frequent character, track the running maximum during the same pass rather than sorting the map afterwards, which would add an unnecessary O(k log k). Follow-ups usually ask for the first non-repeating character, which needs a second pass over the original string in order, because a map does not preserve first-occurrence order unless you store the index too.

Frequently asked questions about Tech Mahindra interviews

Section titled “Frequently asked questions about Tech Mahindra interviews”
What is the Tech Mahindra interview process for freshers?

Tech Mahindra’s fresher process runs: 1. Online Aptitude Test (about 50 minutes, ~75 questions covering quantitative, logical reasoning, and verbal ability, with negative marking). 2. Technical Assessment - a mixed technical/personality screen touching Linux, DSA, software-testing methodology, and SQL. 3. Technical Interview (15-45 minutes) - basic coding (palindrome, Fibonacci via recursion), OOPs, and project discussion. 4. HR Interview - background, salary expectations, and shift/relocation flexibility. Total timeline is roughly 2-4 weeks.

Does Tech Mahindra’s online test have negative marking?

Yes - recent 2024-2026 drives have confirmed negative marking on the aptitude section, which is a meaningful difference from peers like TCS NQT and Wipro’s NLTH, both of which explicitly have no negative marking. That changes the optimal strategy: guessing on quant/reasoning questions you’re unsure of can cost you more than skipping them.

What questions are asked in Tech Mahindra interviews?

The technical assessment covers Linux basics, DSA fundamentals, software-testing methodology, and SQL. The technical interview leans on basic coding (palindrome check, Fibonacci via recursion, reverse a linked list), OOPs concepts, and a detailed project walkthrough - stack choices, hardest bug, and what you’d change. HR covers the standard fit, relocation, and shift questions plus, given Tech Mahindra’s telecom-heavy client base, sometimes a question about handling a difficult client or customer issue.

How many rounds are there in the Tech Mahindra interview?

Typically 3-4 stages: an Online Aptitude Test, a Technical Assessment (sometimes folded into the same sitting as the aptitude test), a Technical Interview, and an HR Interview. Some drives merge the HR round into a single managerial/HR conversation - check that cycle’s placement email for the exact flow.

How should I prepare for Tech Mahindra interviews?

Practise the aptitude test under real time pressure and be careful about guessing, since there’s negative marking. Revise basic DSA patterns (two-pointer, recursion), Linux fundamentals, SQL joins/GROUP BY, and OOPs. Prepare one clear project narrative covering architecture and a real bug, and be ready to talk through a time you handled a difficult client or user issue - Tech Mahindra’s telecom and enterprise-support-heavy project base makes that a recurring HR theme.

What is the eligibility and starting salary for Tech Mahindra freshers?

Eligibility commonly asks for 6.0+ CGPA across 10th, 12th, and graduation. Fresher Associate packages (from student reports) run roughly Rs 3.25-4.5 LPA, confirmed on your specific offer letter since it varies by drive and role.

Looking for placement papers, OA practice, or coding questions?

Section titled “Looking for placement papers, OA practice, or coding questions?”