Tech Mahindra Coding Questions: 12 Problems with Solutions
12 coding problems tagged Tech Mahindra — 8 easy · 4 medium — with solutions in 13 languages. Plus a study plan by topic.
- Problems: 12
- By difficulty: 8 easy · 4 medium
- Languages: JavaScript, TypeScript, Python, Java, C++, C, C#, Go, Kotlin, Swift, Rust, PHP and Ruby
- Cost: Free on every plan; sign in to run and submit
12 problems the CodeKairo catalogue tags as commonly asked in Tech Mahindra's coding rounds — 8 easy and 4 medium, no hard ones — each judged by hidden tests in 13 languages. The most common topics among them are Arrays (5), Math (4) and Dynamic Programming (4). CodeKairo's Tech Mahindra — Aptitude & Technical mock covers the Tech Mahindra aptitude and technical paper, the one services pattern in this catalogue where a wrong answer costs marks. The tag is the catalogue's own annotation of where a problem tends to come up — not a list published by Tech Mahindra, which CodeKairo is not affiliated with.
Tech Mahindra study plan by topic
All 12 problems tagged Tech Mahindra, about 5 h of solving, grouped by technique in the order they build on each other — Hash Table, Counting, Math and Two Pointers and 4 more. It ends with the Tech Mahindra — Aptitude & Technical mock.
The plan
12 problems on Hash Table, Counting, Math, Two Pointers, Recursion, Divide and Conquer, Sieve of Eratosthenes and Dynamic Programming, easiest first within each topic.
- Two Sum Easy
- Valid Anagram Easy
- Strong Number Easy
- Reverse Integer Medium
- Valid Palindrome Easy
- Remove Duplicates from Sorted Array Easy
- Merge Sorted Array Easy
- Fibonacci Number Easy
- Maximum Subarray Medium
- Count Primes Medium
- Best Time to Buy and Sell Stock Easy
- Longest Palindromic Substring Medium
Then: the timed test
Sit the Tech Mahindra — Aptitude & Technical mock under the clock — the coding problems are only one part of the round.
Tech Mahindra test patterns
- Tech Mahindra — Aptitude & Technical pattern guide and timed mock
The Tech Mahindra recruitment process, round by round
All problems tagged Tech Mahindra
Easy (8)
- Strong Number Math
- Fibonacci Number Math, Dynamic Programming, Recursion
- Valid Palindrome String, Two Pointers
- Merge Sorted Array Array, Two Pointers, Sorting
- Remove Duplicates from Sorted Array Array, Two Pointers
- Best Time to Buy and Sell Stock Array, Dynamic Programming
- Valid Anagram Hash Table, String, Sorting
- Two Sum Array, Hash Table
Medium (4)
- Count Primes Math, Sieve of Eratosthenes
- Reverse Integer Math
- Longest Palindromic Substring String, Dynamic Programming
- Maximum Subarray Array, Dynamic Programming, Divide and Conquer
Topics Tech Mahindra asks most
- Arrays 5 problems
- Math 4 problems
- Dynamic Programming 4 problems
- Strings 3 problems
- Two Pointers 3 problems
- Hash Table 2 problems
- Sorting 2 problems
- Counting 1 problem
- Recursion 1 problem
- Divide and Conquer 1 problem
- Sieve of Eratosthenes 1 problem