HackTheRounds Interview Experiences
NVIDIA OA Interview Experience (2026) - HackerRank Walkthrough
NVIDIA SWE OA on HackerRank: Sum of Subarray Minimums (monotonic stack with tiebreaks) and Unique Integers Summing to Zero. Full solutions and speed tips.
By Anonymous · 2026-04-10
Background
I went through NVIDIA's 2026 OA cycle for a Software Engineer role on their systems-software team. I had about 4 years of low-level C++ and CUDA experience and applied through a recruiter who reached out on LinkedIn after a GitHub project I had published. NVIDIA's OA is on HackerRank, 2 problems in 75 minutes.
Timeline
- Recruiter ping: mid-March
- OA link: 2 days later, 5-day window to complete
- OA attempted: 3 days after I got it
- Outcome: passed the OA, currently waiting on phone screen
- Total so far: about 3 weeks
I'm writing this while the process is still ongoing, so I'll only cover the OA here.
OA Format (75 min, HackerRank)
Two problems. In my round, both were algorithm-heavy — no system design or C++-specific questions in the OA. The questions are drawn from a standard HackerRank pool, which means they're mostly well-known problems in light disguise.
Problem 1: Sum of Subarray Minimums
Problem: Given an array of integers, for each contiguous subarray compute its minimum value. Return the sum of all those minimums, modulo 10^9 + 7.
This is a classic monotonic stack problem. The O(n²) solution (for each subarray, find the min) is too slow for n = 10^5. The O(n) solution uses the observation: for each element arr[i] , count the number of subarrays in which arr[i] is the minimum, then multiply by arr[i] and sum.
An element arr[i] is the minimum of subarray [l, r] iff all of arr[l..i-1] are arr[i] and all of arr[i+1..r] are = arr[i] (or any consistent tiebreak on equal values — pick one to avoid double-counting).
For each i , find the distance to the previous strictly smaller element on the left and the distance to the next smaller-or-equal element on the right. The product of those two distances is the number of subarrays in which arr[i] is the minimum. Multiply by the value, sum across all indices, and take the result mod 10^9 + 7.
Both distance arrays come from single monotonic stack passes. The tiebreak asymmetry ( = on the left, on the right) is important: using = on both sides double-counts subarrays where the minimum value repeats. Overall O(n) time and O(n) space. I tested on [3, 1, 2, 4] mentally and got 17, which matches the known expected answer.
Problem 2: Unique Integers That Sum to Zero
Problem: Given a positive integer n, return any array of n unique integers (any integers, positive/negative/zero) that sum to zero.
This one looks trivial and it is. There's a trap where candidates over-think it.
Observations: - For n = 1, return [0] - For n = 2, return [-1, 1] - For n odd, return [-(n-1)/2, ..., -1, 0, 1, ..., (n-1)/2] - For n even, return [-n/2, ..., -1, 1, ..., n/2] (skip zero because we already have n numbers)
Uniform approach that works for both parities: emit the pairs (i, -i) for i from 1 up to n/2, then append a 0 if n is odd. O(n) time, O(n) space for the output. Quick sanity: empty for n = 0, [0] for n = 1, [1, -1] for n = 2, [1, -1, 0] for n = 3.
Practice it: [[problem/418?company=17|3Sum]]
I spent about 5 minutes on this problem including reading the prompt. Use the rest of the time to re-verify Problem 1 and submit confident.
What I Learned From the OA
NVIDIA's OA problems are classic HackerRank problems. If you've prepared for standard OA pools (neetcode 150, common HackerRank sets), you've already seen both.
The trick is speed and correctness under time pressure, not novel algorithm design. Monotonic stack and two-pointer are the two highest-value patterns to internalize for NVIDIA OAs.
Tips
- Memorize the Sum-of-Subarray-Minimums pattern. It shows up constantly — NVIDIA, Amazon, Meta, Google OAs all pull from this pool. Know the `>=` vs `>` tiebreak cold.
- For easy problems like Problem 2, don't over-engineer. If the problem gives you freedom ("any array that sums to zero"), take the simplest construction. Candidates sometimes write elaborate solutions and then break edge cases.
- Use HackerRank's test-run feature. Submit against sample inputs before final submit. The platform gives you this for free — use it.
- For monotonic stack problems, handle ties explicitly. Before coding, decide which side uses `>` and which uses `>=`. Write that decision in a comment. Not handling ties is the most common mistake on this problem class.
- Watch for modulo arithmetic. If the problem says "modulo 10^9 + 7," apply the modulo at the end of each contribution, not just at the final sum, to avoid integer overflow in languages like C++.
- NVIDIA OA rewards finishing fast with time to spare. Both problems should be solved in under 45 minutes. Use the remaining time to re-verify edge cases — n = 1, n = 0, single-element arrays, all-equal arrays.
Will update this post once I go through the phone screen and onsite. The OA was straightforward; the harder rounds are still ahead.