Find the Integer Added to Array I
A easy-tier problem at 82% community acceptance, tagged with Array. Reported in interviews at Mitsogo and 0 others.
You're staring at a problem asking you to find an integer added to every element of an array. Sounds trivial, but the catch is you've got the original array and the modified array, and you need to extract that magic number fast. Mitsogo asked this. It's an easy problem with an 82% acceptance rate, which means most people solve it, but careless implementations and off-by-one logic still trip candidates in live OAs. If you blank on the approach mid-assessment, StealthCoder surfaces a working solution in seconds, invisible to the proctor.
Companies that ask "Find the Integer Added to Array I"
Find the Integer Added to Array I 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. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop.
Get StealthCoderThe trick here is dead simple: pick any element from the original array, find its corresponding element in the modified array, and subtract. The difference is your answer. Every element had the same integer added, so one subtraction gives you the global value. The pitfall is overcomplicating it: don't loop unnecessarily, don't assume array length, don't get tangled in edge cases that don't exist. Most fails come from reading the problem sloppily and missing that all elements were modified identically. The obvious greedy approach (grab the first element, compute the difference, verify against others) is the right one. Code this in under two minutes. If you're stuck on indexing or array bounds during the live OA, StealthCoder runs invisibly and hands you the solution so you can move on.
Pattern tags
You know the problem.
Make sure you actually pass it.
Find the Integer Added to Array I 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. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Find the Integer Added to Array I interview FAQ
Is this actually asked at real companies, or is it just a warm-up?+
Mitsogo has asked it. At an 82% acceptance rate, it's genuinely easy, but easy doesn't mean it won't appear in your OA loop. Companies use easy problems to filter out candidates who can't code cleanly under pressure. Treat it seriously.
What's the time complexity I need to hit?+
O(1) or O(n) both work. Since all elements had the same integer added, you only need one subtraction to find the answer. No loop required. If you're iterating over the entire array to verify, that's O(n), which is fine but unnecessary.
Can the integer added be negative?+
The problem doesn't restrict it, so yes, it can be negative. Your solution should handle that. Subtraction works the same way. Don't add a special case for negative numbers.
What if the arrays are empty or have different lengths?+
The problem implies both arrays are non-empty and have the same length. Real OAs usually specify these constraints explicitly. If you're unsure, ask the proctor or assume the straightforward case and code it.
Why is this an easy problem and not trivial?+
Candidates often overthink it under time pressure. They chase complex patterns or write unnecessary loops when a single subtraction solves it. The 18% fail rate comes from speed mistakes and misreading, not algorithmic depth.
Want the actual problem statement? View "Find the Integer Added to Array I" on LeetCode →