Form Smallest Number From Two Digit Arrays
A easy-tier problem at 54% community acceptance, tagged with Array, Hash Table, Enumeration. Reported in interviews at Tinkoff and 0 others.
You've got two arrays of single digits. You need to form the smallest possible number using one digit from each array, picking a digit from the first array and a digit from the second array. Sounds trivial until you realize the brute-force intuition will crater you. Tinkoff has asked this. The trick isn't complicated, but the execution detail costs candidates real time during a live assessment. If you blank on the enumeration strategy, StealthCoder solves it invisibly while the proctor watches your screen.
Companies that ask "Form Smallest Number From Two Digit Arrays"
Form Smallest Number From Two Digit Arrays is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made for the engineer who has done the work but might still blank with a webcam pointed at him.
Get StealthCoderThe catch is that you can't just pick the smallest digit from each array independently. You need to form a two-digit number (or single digit, depending on interpretation), so you have to compare all valid pairings and find the minimum. Most candidates start with nested loops and immediately second-guess themselves on edge cases. The real pattern is enumeration: iterate through every combination of one digit from array one and one digit from array two, form the candidate numbers, and return the minimum. Hash tables aren't strictly necessary here, but they help you deduplicate or track which digit pairs you've already checked. When you hit this on a live OA and your first instinct is 'wait, can I sort and pick the min of each', StealthCoder gives you the working enumeration solution in seconds, no proctor visibility.
Pattern tags
You know the problem.
Make sure you actually pass it.
Form Smallest Number From Two Digit Arrays recycles across companies for a reason. It's easy-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made for the engineer who has done the work but might still blank with a webcam pointed at him. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Form Smallest Number From Two Digit Arrays interview FAQ
How does the acceptance rate of 54% affect my prep strategy?+
A 54% pass rate means roughly half the candidates miss the enumeration pattern or mess up the comparison logic during the timer. It's not a hard problem algorithmically, so the failures are careless mistakes under pressure. Drill the exact pairing and comparison logic once; that's enough.
Is this problem really just Array, Hash Table, and Enumeration, or is there a trick I'm missing?+
No hidden trick. The topics map directly to the solution: iterate arrays (Enumeration), optionally use a hash table to track seen pairs (Hash Table), work with the digit arrays (Array). The cognitive load is managing the comparison logic cleanly, not the algorithm itself.
Why would Tinkoff ask this if it's an easy problem?+
Tinkoff is screening for whether you can implement simple logic without mistakes at speed. Easy problems still filter candidates because live-OA pressure causes off-by-one errors, wrong comparisons, or returning the wrong format. This is a speed and clarity test, not a complexity test.
Do I need to handle negative numbers or multi-digit inputs?+
The problem specifies two digit arrays, so inputs are 0-9 per element. No negatives, no multi-digit inputs. Form the smallest number from pairing one digit from each array. That constraint makes the solution space tiny.
What's the most common mistake candidates make on this problem?+
Assuming you sort each array and pick the first element from each, then concatenate. That doesn't always give the global minimum. You have to check all pairings. The second mistake is returning the result as a string when the problem expects an integer, or vice versa. Read the output spec carefully.
Want the actual problem statement? View "Form Smallest Number From Two Digit Arrays" on LeetCode →