Reported February 2024
Intuitsorting

Get Min Difference

Reported by candidates from Intuit's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Intuit OA. Under 2s to a working solution.
Founder's read

Intuit's February 2024 OA included "Get Min Difference," and candidates blanked on whether it was asking for the minimum gap between elements, minimum operations to equalize values, or something else entirely. The problem title itself is vague, which is intentional. You're looking at either a sorting + two-pointer pattern or a greedy/math approach depending on the hidden constraints. StealthCoder will read the full problem text on your screen and surface the pattern fast if your mind goes blank under pressure.

Pattern and pitfall

Without the verbatim problem text, the most likely interpretation is: given an array, find the minimum difference between any two elements. Sort the array, then iterate through adjacent pairs and track the minimum gap. Time complexity O(n log n), space O(1) if you sort in place. The trick candidates miss is that the minimum difference must occur between consecutive elements in a sorted array, so brute-force pairwise comparison is wasteful. If the problem instead asks for minimum operations to make all elements equal or minimum difference after K operations, the approach shifts to math or greedy. StealthCoder catches this ambiguity live and locks in the right interpretation before you code.

Memorize the pattern. If you can't, run StealthCoder. The proctor sees the IDE. They don't see what's behind it.

If this hits your live OA

You can drill Get Min Difference cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Intuit's OA.

Intuit reuses patterns across OAs. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Get Min Difference FAQ

Is this a sorting problem or math?+

Most likely sorting plus two-pointers. Sort the array, iterate through adjacent pairs, track minimum gap. If it's asking for operations or transformations, it leans greedy or math. The problem statement determines the pivot. Read it twice.

What's the common mistake candidates make?+

Comparing every pair (O(n^2)) instead of realizing the minimum difference always exists between consecutive elements in a sorted array. Also misreading whether the problem asks for the difference itself, the indices, or the pair of elements.

How do I prepare in 48 hours?+

Nail sorting + two-pointer patterns. Practice problems like "Best Time to Buy and Sell Stock," "Container With Most Water," and "3Sum." Know your language's sort function and how to iterate cleanly. Edge cases: empty arrays, single element, duplicates.

Will Intuit ask follow-ups?+

Possibly. They may ask for the actual pair, not just the difference. Or they add constraints like "minimum difference with at least K elements apart" or "difference must involve elements at different indices." Clarify the output format upfront.

Is this question still being asked in 2024?+

Yes. Intuit still uses sorting and two-pointer problems in OAs. The title is deliberately vague to test reading comprehension under time pressure. Understanding the exact ask is half the battle.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Intuit.

OA at Intuit?
Invisible during screen share
Get it