Mahindra & Mahindra (M&M) Interview Preparation

55+ IoT, automotive, embedded systems and DSA questions with complete solutions.

QuestionAnswerCategory
Q1. What is Internet of Things?Connected devices collecting/sharing data. Used in smart cars, homes, manufacturing, agriculture.Technical
Q2. Explain vehicle control systems.Engine control, ABS, airbags, infotainment. Real-time constraints, safety-critical.Technical
Q3. Two pointer approach.Converging pointers from ends of sorted array. Efficient for finding pairs.Coding
Q4. RTOS concepts.Real-Time Operating System: priority-based scheduling, deterministic, used in automotive/industrial.Technical
Q5. DSA: Merge sorted arrays.Two pointer merge. O(n+m) time.
def merge(arr1, arr2):
    result, i, j = [], 0, 0
    while i < len(arr1) and j < len(arr2):
        if arr1[i] <= arr2[j]:
            result.append(arr1[i])
            i += 1
        else:
            result.append(arr2[j])
            j += 1
    return result + arr1[i:] + arr2[j:]
Coding
Q6. Sensors in automotive.Speed, temperature, pressure, acceleration sensors. Real-time monitoring of vehicle parameters.Technical
Q7. Longest substring without repeating.Sliding window with hashmap. O(n) time.Coding
Q8. Interrupt handling.Mechanism to handle events asynchronously. Priority levels, context switching in embedded systems.Technical
Q9. Binary search.Divide search space. O(log n) on sorted array.
def binary_search(arr, target):
    left, right = 0, len(arr) - 1
    while left <= right:
        mid = (left + right) // 2
        if arr[mid] == target:
            return mid
        elif arr[mid] < target:
            left = mid + 1
        else:
            right = mid - 1
    return -1
Coding
Q10. CAN bus protocol.Controller Area Network: communication protocol in vehicles. Ensures data integrity, EMI resistance.Technical
Q11. Maximum subarray sum (Kadane).Track current and max sum. Reset current if negative.
def max_subarray(arr):
    max_sum = curr_sum = arr[0]
    for num in arr[1:]:
        curr_sum = max(num, curr_sum + num)
        max_sum = max(max_sum, curr_sum)
    return max_sum
Coding
Q12. MQTT protocol.Lightweight publish-subscribe for IoT. Low bandwidth, ideal for embedded devices.Technical
Q13. Reverse linked list.Three pointers: prev, curr, next. Reverse iteratively.Coding
Q14. Palindrome check.Compare with reverse. Ignore case/spaces.Coding
Q15. Memory management in embedded.Limited RAM/ROM. Stack, heap, static memory. Careful allocation prevents overflow.Technical
Q16. Two Sum problem.Hashmap for O(n). Store complement values.Coding
Q17. Valid parentheses.Stack: push open, pop close. Empty stack = valid.Coding
Q18. Electric vehicle battery management.Monitor voltage, current, temperature. Ensure safety and efficiency.Technical
Q19. Remove duplicates sorted array.Two pointers. Count unique elements.Coding
Q20. Edge computing.Process data near source (IoT device) instead of cloud. Lower latency, bandwidth savings.Technical
Q21. Fibonacci series.Each = sum of previous two. Start: 0, 1.Coding
Q22. Factorial.Product of all positive integers ≤ n. Recursive or iterative.Coding
Q23. Timer/counter in embedded.Generate delays, count events, PWM signals. Essential for timing-critical applications.Technical
Q24. Rotate array by k.Slicing or reverse. O(n) time, O(1) space.Coding
Q25. ABS system.Anti-lock braking: prevents wheel lockup. Detects skidding, modulates brake pressure.Technical
Q26. GCD calculation.Euclidean algorithm: gcd(a,b) = gcd(b, a%b).Coding
Q27. String reversal.Slicing or loop-based reversal.
def reverse(s):
    return s[::-1]
Coding
Q28. Security in IoT.Encryption, authentication, secure boot, firmware updates, DDoS protection.Technical
Q29. Anagram check.Sort both strings or use character frequency.Coding
Q30. Infotainment systems.Audio, navigation, connectivity. Integration with vehicle control systems.Technical
Q31. Tell me about yourself.Education, projects, interest in automotive/IoT, internships, skills.HR
Q32. Why M&M?Industry leader, innovation in electric vehicles, automotive excellence, growth opportunities.HR
Q33. Strengths.Problem-solving, system thinking, adaptability, analytical, collaborative.HR
Q34. Array intersection.Hashset approach. O(n+m) time.Coding
Q35. Missing number.Sum formula: expected - actual. XOR also works.Coding
Q36. Watchdog timer.Resets system if not serviced. Prevents system hang/freeze.Technical
Q37. Prime number check.Check divisibility up to sqrt(n).Coding
Q38. ADAS (Advanced Driver Assistance).Lane keeping, collision warning, adaptive cruise control. Improves safety.Technical
Q39. Second largest element.Track first and second. O(n) time, O(1) space.Coding
Q40. Machine learning in IoT.Predictive maintenance, anomaly detection, optimization. Edge ML for privacy.Technical
Q41. Pressure handling.Prioritize, break problems, communicate, stay focused, think solutions.HR
Q42. Salary expectations.Research automotive sector. Give realistic range.HR
Q43. Count character freq.Hashmap or counter. O(n) time.Coding
Q43. GPIO programming.General Purpose Input/Output: digital I/O control. Essential for hardware interfacing.Technical
Q44. Bubble sort.Compare adjacent, swap. O(n²) worst case.Coding
Q45. Regenerative braking.Convert kinetic energy to electrical. Improves efficiency in EVs.Technical
Q46. How do you learn?Courses, projects, blogs, GitHub, documentation, hands-on experimentation.HR
Q46. Selection sort.Find minimum, swap. O(n²) always.Coding
Q47. Insertion sort.Build sorted array incrementally. O(n²) worst, O(n) best.Coding
Q48. Zigbee protocol.Low-power wireless for home automation, smart devices. Mesh networking.Technical
Q49. LCM calculation.lcm(a,b) = (a*b) / gcd(a,b).Coding
Q50. Career goals in 5 years.Senior engineer, embedded systems specialist, automotive tech lead.HR
Q51. Merge sorted lists.Compare elements, merge incrementally.Coding
Q52. Transpose matrix.Swap rows and columns. Create new matrix or in-place.Coding
Q53. Power management.Sleep modes, clock gating, voltage scaling. Reduce power consumption in embedded devices.Technical
Q54. Matrix multiplication.Standard algorithm O(n³) or Strassen O(n²·⁸⁷).Coding
Q55. Any questions?Ask about IoT projects, electric vehicles, embedded systems, training, mentoring, tech stack.HR