Recently, our team has been helping several candidates prepare for NVIDIA OA and subsequent coding rounds, and the hit rate has been extremely high. For roles like AI Engineer, CUDA Developer, and Systems Software Engineer, NVIDIA’s coding questions are increasingly focused on bit manipulation, mathematical enumeration, efficient data structures, and greedy strategies.
Below are 5 high-frequency NVIDIA OA problems from 2026. Mastering these will cover a large portion of recent OA and onsite coding rounds.
Problem 1: Ideal Numbers
Definition: A positive integer is considered an ideal number if its prime factors only include 3 and 5. In other words, it can be expressed as 3^x * 5^y, where x and y are non-negative integers.
Examples: 15, 45, 75 are ideal numbers; 6, 10, 21 are not.
Task: Given a range [low, high], count how many ideal numbers fall within this range.
Example: In [200, 405], there are 4 ideal numbers (225, 243, 375, 405).
Function: getIdealNums(low, high) → integer
Core Idea: Since the exponents of 3 and 5 grow logarithmically, we can enumerate all possible pairs (x, y), compute 3^x * 5^y, and count those within the range. The complexity is very low.
Problem 2: Recover Original Array from Prefix XOR
Definition: Given a prefix XOR array pref, where:
pref[i] = arr[0] ^ arr[1] ^ ... ^ arr[i]
Task: Recover the original array arr.
Example: pref = [5, 2, 10] → arr = [5, 7, 8]
Function: getOriginalArray(pref) → array
Constraints: n ≤ 10^5, pref[i] ≤ 10^9
Core Idea: Use XOR properties:
arr[0] = pref[0]
arr[i] = pref[i] ^ pref[i-1] (for i ≥ 1)
This is a direct linear pass solution.
Problem 3: Same 4KB Memory Page
Task: Given two memory addresses in a 32-bit system, determine whether they belong to the same 4KB page.
Observation: Page size = 4096 bytes = 2^12, so addresses in the same page share the same higher bits.
Example: 4095 and 4094 are in the same page → return true
Function: samePage(addr1, addr2) → boolean
Core Idea: Mask out the lower 12 bits:
(addr1 & ~0xFFF) == (addr2 & ~0xFFF)
This is a classic bit manipulation + memory alignment problem.
Problem 4: Generate Bit Mask
Task: Given hi and lo, generate a 32-bit mask where bits from lo to hi are set to 1, and others are 0. Return the result as a hexadecimal string.
Example: hi = 2, lo = 0 → output "0x7"
Function: SetMask(hi, lo) → string
Core Idea:
((1 << (hi + 1)) - 1) & ~((1 << lo) - 1)
First generate all 1s from 0 to hi, then clear bits below lo. Pay attention to boundary cases and 32-bit constraints.
Problem 5: Maximum Score
Task: Given an integer array arr, start with score = 0.
In each operation:
- Select an element and add it to the score
- Replace it with ceil(val / 3)
Repeat k times and return the maximum possible score.
Example: arr = [20, 4, 3, 1, 9], k = 4 → max score = 40
Function: getMaximumScore(arr, k) → integer
Constraints: n ≤ 10^5, k ≤ 10^5, arr[i] ≤ 10^9
Core Idea: Greedy + max heap.
Always pick the largest number, add it to the score, then push back ceil(val / 3), i.e., (val + 2) // 3.
Use heapq (with negatives) in Python or priority_queue in C++.
Final Thoughts
NVIDIA OA questions are relatively structured, but they increasingly emphasize engineering thinking and optimization awareness—especially bit manipulation, heap usage, and efficient enumeration.
If your preparation feels scattered or inefficient, structured guidance can make a big difference.
We provide full solutions (Python/C++) for these problems, along with more recent NVIDIA OA and onsite questions, including system design and CUDA-related topics.
ProgramHelp has been consistently helping candidates land offers from NVIDIA, Microsoft, Google, and other top-tier companies.
For OA support, VO guidance, or full interview preparation, feel free to reach out:
https://programhelp.net/en/contact/
Good luck, and hope you land your NVIDIA offer soon.
Top comments (0)