# Mathworks Coding Interview Questions

> 32 DSA problems asked in Mathworks coding interviews and online assessments, sorted easiest first with hints. Free practice for placements on InternHack.

Canonical: https://www.internhack.in/learn/dsa/companies/mathworks
Last updated: 2026-11-28

32 DSA problems tagged as asked in Mathworks coding interviews and online assessments. Below are all 32: 6 easy, 15 medium and 11 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## Mathworks DSA problems, easiest first

1. [Convert Binary Number in a Linked List to Integer](https://www.internhack.in/learn/dsa/problem/convert-binary-number-in-a-linked-list-to-integer) (Easy)
2. [Keyboard Row](https://www.internhack.in/learn/dsa/problem/keyboard-row) (Easy)
3. [Lexicographically Smallest Palindrome](https://www.internhack.in/learn/dsa/problem/lexicographically-smallest-palindrome) (Easy)
4. [Maximum Difference Between Increasing Elements](https://www.internhack.in/learn/dsa/problem/maximum-difference-between-increasing-elements) (Easy)
5. [Pass the Pillow](https://www.internhack.in/learn/dsa/problem/pass-the-pillow) (Easy)
6. [Reshape the Matrix](https://www.internhack.in/learn/dsa/problem/reshape-the-matrix) (Easy)
7. [Break a Palindrome](https://www.internhack.in/learn/dsa/problem/break-a-palindrome) (Medium)
8. [Count Vowel Strings in Ranges](https://www.internhack.in/learn/dsa/problem/count-vowel-strings-in-ranges) (Medium)
9. [Earliest Second to Mark Indices I](https://www.internhack.in/learn/dsa/problem/earliest-second-to-mark-indices-i) (Medium)
10. [Find the Longest Equal Subarray](https://www.internhack.in/learn/dsa/problem/find-the-longest-equal-subarray) (Medium)
11. [Maximum Number of Alloys](https://www.internhack.in/learn/dsa/problem/maximum-number-of-alloys) (Medium)
12. [Maximum Palindromes After Operations](https://www.internhack.in/learn/dsa/problem/maximum-palindromes-after-operations) (Medium)
13. [Minimum Cost to Connect Sticks](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-connect-sticks) (Medium)
14. [Minimum Cost Tree From Leaf Values](https://www.internhack.in/learn/dsa/problem/minimum-cost-tree-from-leaf-values) (Medium)
15. [Minimum Equal Sum of Two Arrays After Replacing Zeros](https://www.internhack.in/learn/dsa/problem/minimum-equal-sum-of-two-arrays-after-replacing-zeros) (Medium)
16. [Number of Divisible Triplet Sums](https://www.internhack.in/learn/dsa/problem/number-of-divisible-triplet-sums) (Medium)
17. [Remove Colored Pieces if Both Neighbors are the Same Color](https://www.internhack.in/learn/dsa/problem/remove-colored-pieces-if-both-neighbors-are-the-same-color) (Medium)
18. [Sell Diminishing-Valued Colored Balls](https://www.internhack.in/learn/dsa/problem/sell-diminishing-valued-colored-balls) (Medium)
19. [Shopping Offers](https://www.internhack.in/learn/dsa/problem/shopping-offers) (Medium)
20. [Task Scheduler](https://www.internhack.in/learn/dsa/problem/task-scheduler) (Medium)
21. [Total Cost to Hire K Workers](https://www.internhack.in/learn/dsa/problem/total-cost-to-hire-k-workers) (Medium)
22. [Binary Tree Cameras](https://www.internhack.in/learn/dsa/problem/binary-tree-cameras) (Hard)
23. [Count Anagrams](https://www.internhack.in/learn/dsa/problem/count-anagrams) (Hard)
24. [Count Subarrays With Fixed Bounds](https://www.internhack.in/learn/dsa/problem/count-subarrays-with-fixed-bounds) (Hard)
25. [Count Vowels Permutation](https://www.internhack.in/learn/dsa/problem/count-vowels-permutation) (Hard)
26. [Earliest Second to Mark Indices II](https://www.internhack.in/learn/dsa/problem/earliest-second-to-mark-indices-ii) (Hard)
27. [Last Substring in Lexicographical Order](https://www.internhack.in/learn/dsa/problem/last-substring-in-lexicographical-order) (Hard)
28. [Minimum Difficulty of a Job Schedule](https://www.internhack.in/learn/dsa/problem/minimum-difficulty-of-a-job-schedule) (Hard)
29. [Minimum Edge Reversals So Every Node Is Reachable](https://www.internhack.in/learn/dsa/problem/minimum-edge-reversals-so-every-node-is-reachable) (Hard)
30. [Reverse Nodes in k-Group](https://www.internhack.in/learn/dsa/problem/reverse-nodes-in-k-group) (Hard)
31. [Split Array Largest Sum](https://www.internhack.in/learn/dsa/problem/split-array-largest-sum) (Hard)
32. [String Transformation](https://www.internhack.in/learn/dsa/problem/string-transformation) (Hard)

## Prepare for the rest of the Mathworks process

- [Aptitude questions by company](https://www.internhack.in/learn/aptitude/companies)
- [Technical interview questions](https://www.internhack.in/learn/interview)
- [Free ATS resume check](https://www.internhack.in/ats-score/try), no signup

## Other companies

- [Google](https://www.internhack.in/learn/dsa/companies/google) (2217)
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon) (1938)
- [Meta](https://www.internhack.in/learn/dsa/companies/meta) (1387)
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft) (1352)
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg) (1173)
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok) (383)
- [Uber](https://www.internhack.in/learn/dsa/companies/uber) (381)
- [Apple](https://www.internhack.in/learn/dsa/companies/apple) (356)
- [Oracle](https://www.internhack.in/learn/dsa/companies/oracle) (340)
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs) (270)
- [Adobe](https://www.internhack.in/learn/dsa/companies/adobe) (227)
- [TCS](https://www.internhack.in/learn/dsa/companies/tcs) (217)
- [Salesforce](https://www.internhack.in/learn/dsa/companies/salesforce) (189)
- [Linkedin](https://www.internhack.in/learn/dsa/companies/linkedin) (180)
- [Zoho](https://www.internhack.in/learn/dsa/companies/zoho) (179)
- [IBM](https://www.internhack.in/learn/dsa/companies/ibm) (170)
- [Infosys](https://www.internhack.in/learn/dsa/companies/infosys) (158)
- [Walmart Labs](https://www.internhack.in/learn/dsa/companies/walmart-labs) (152)
- [Accenture](https://www.internhack.in/learn/dsa/companies/accenture) (144)
- [Nvidia](https://www.internhack.in/learn/dsa/companies/nvidia) (137)
- [Yandex](https://www.internhack.in/learn/dsa/companies/yandex) (134)
- [DE Shaw](https://www.internhack.in/learn/dsa/companies/de-shaw) (124)
- [Visa](https://www.internhack.in/learn/dsa/companies/visa) (124)
- [Flipkart](https://www.internhack.in/learn/dsa/companies/flipkart) (117)

## Related

- [Home](https://www.internhack.in/)
- [Learn](https://www.internhack.in/learn)
- [DSA by company](https://www.internhack.in/learn/dsa/companies)
