Basic programming problems (Palindrome, Factorial, Prime)
Filed under Tech Mahindra
The question
Write code for a palindrome string, swapping three numbers without a third variable, finding a prime number, computing a factorial, and printing a specific number pattern.
No write-up yet. Related questions below have one.
Related Tech Mahindra questions
- Two basic coding problems: array maximum and word/space count
- Network Protocol: Decimal to Binary Conversion
- Aptitude and coding test with array second smallest element and anagrams
- Technical interview on OOP polymorphism, SQL joins, linked list cycles, and deadlocks
- Coding questions and pseudocode evaluation
Collected from public candidate posts and coding forums. Updated Nov 2026.