0 day streak

MathWorks coding interview questions

Product India

Ranked by how often candidates report them. Each opens in the editor with hidden tests, an animated walkthrough and solutions in four languages; a question you solve once counts for every company that asks it.

0%ready
Your level: practise every reported question.
ProgressTitleDifficultyTopicHow often hereAlso asked atNext step
Cherry Pickup2D DP Hard Dynamic Programming Tower Research Capital, BNY, Akuna Capital +5 Solve
Implement Queue using StacksStack Basics Easy Stack Microsoft, Meta, Apple +28 Solve
Sell Diminishing-Valued Colored BallsBinary Search on Answer Space Medium Binary Search Goldman Sachs, JPMorgan Chase, Visa +1 Solve
Maximum Palindromes After OperationsGreedy Medium Arrays & Hashing Grammarly, Visa, IBM +1 Solve
Binary Tree CamerasPostorder + Multiple Return Values Hard Trees & BST Nutanix, eBay, Quora +5 Solve
Count Subarrays With Fixed BoundsSliding Window · Variable Hard Arrays & Hashing Morgan Stanley, PhonePe, Meesho Solve
Minimum Edge Reversals So Every Node Is ReachableRe-rooting DP Hard Graphs Microsoft, Uber, Salesforce +4 Solve
Task SchedulerGreedy Medium Arrays & Hashing Amazon, Uber, Snowflake +18 Solve
Reverse Nodes in k-GroupFront Middle Back Pointer Hard Linked List Amazon, Microsoft, Meta +33 Solve
Number of Divisible Triplet SumsHashing Medium Arrays & Hashing Palantir, Zscaler, Activision Blizzard +1 Solve
Count Vowel Strings in RangesPrefix Sum Strategy Medium Arrays & Hashing Twilio, PayPal, IBM Solve
Valid ParenthesesStack Basics Easy Stack Google, Amazon, Microsoft +119 Solve
Longest Palindromic SubsequenceStrings Medium Dynamic Programming Microsoft, LinkedIn, Goldman Sachs +8 Solve
Break a PalindromeTwo Pointer Medium Arrays & Hashing Nvidia, Expedia Group, VMware by Broadcom +2 Solve
Convert Binary Number in a Linked List to IntegerBasics Easy Bit Manipulation Nutanix, Arista Networks, Juniper Networks +3 Solve
Minimum Difficulty of a Job Schedule2D DP Hard Dynamic Programming Microsoft, Atlassian, BharatPe Solve
Shortest Distance from All BuildingsMulti source BFS Hard Graphs Meta, DoorDash, Snap +3 Solve
Reverse Linked ListFront Middle Back Pointer Easy Linked List Microsoft, Apple, Bloomberg +81 Solve
Degree of an ArrayHashing Easy Arrays & Hashing Robinhood, Expedia Group, Agoda +5 Solve
Bulb SwitcherMath / Number Theory Medium Arrays & Hashing LinkedIn, Infosys, Tekion Solve
Unique Paths II2D DP Medium Dynamic Programming Nvidia, Agoda, GoDaddy +9 Solve
Binary Tree Right Side ViewViews Medium Trees & BST Google, Meta, TikTok (ByteDance) +16 Solve
Number of IslandsConnected Components Medium Graphs Google, Amazon, Microsoft +114 Solve
Implement Stack using QueuesStack Basics Easy Stack Twilio, Goldman Sachs, Qualcomm +14 Solve
Distinct SubsequencesStrings Hard Dynamic Programming Google, Coupang, JPMorgan Chase +5 Solve
Also reported, being added to AlgoRung (23)

Maximum Difference Between Increasing Elements · Total Cost to Hire K Workers · Maximum Number of Alloys · Shopping Offers · Reshape the Matrix · Count Anagrams · Remove Colored Pieces if Both Neighbors are the Same Color · Last Substring in Lexicographical Order · Minimum Cost Tree From Leaf Values · Earliest Second to Mark Indices II · Earliest Second to Mark Indices I · Keyboard Row · Pass the Pillow · Minimum Equal Sum of Two Arrays After Replacing Zeros · Lexicographically Smallest Palindrome · Count Vowels Permutation · Total Characters in String After Transformations I · String Transformation · Find the Longest Equal Subarray · Verify Preorder Sequence in Binary Search Tree · Beautiful Arrangement · 3Sum Smaller · Counting Bits

Questions people ask

What coding questions does MathWorks ask most?

Cherry Pickup, Implement Queue using Stacks, Sell Diminishing-Valued Colored Balls, Maximum Palindromes After Operations, Binary Tree Cameras, Count Subarrays With Fixed Bounds, Minimum Edge Reversals So Every Node Is Reachable, Task Scheduler.

Which topics come up in MathWorks coding rounds?

arrays, strings, dynamic programming, trees, graphs, stack.

How hard are MathWorks coding questions?

Of the reported questions, 6 are easy, 11 medium and 8 hard. A 45 to 60 minute live interview where you solve one or two data-structures-and-algorithms problems while explaining your thinking. Interviewers score problem solving, code quality, testing and communication.