One candidate interviewed at Nvidia for a compiler engineer position. Their thesis was on the compiler front end in Clang. They built a tool that works like a compiler and performs static analysis of code written in C, that is, almost a C linter. They were a graduate of IIT, one of the best universities in India, and had a little over a year of work experience.
Hiring Manager Round
The hiring manager was working on a team at Nvidia that was doing GPU compiler optimization and sat for a while discussing the type of optimization he was working on. Then questions arose in the same area, including peephole optimization and loop optimization. The candidate knew before the interview that the hiring manager was from the optimization team, so they studied all this.
They were also candid and said that they had never really worked on optimization. Important to know: optimization is part of the back end of the compiler, and here you also need to understand the hardware architecture.
If you're preparing for questions like these about the team, there's something else that can help you in the real round. InterviewMan hears the interviewer and writes the answer while you speak. The answer appears in a window that does not show on screen sharing, or on a phone connected in Stealth Mode.
First round of coding
- Print all permutations of a string. The candidate asked for another question because they had not gone over backtracking before this interview. The interviewer was nice and changed the question.
- Merge sort on a linked list with full running time analysis. The code was ok, but the analysis was not. They split the list into two parts, merged the two parts, repeated the same thing recursively, and then said it required
. This was wrong. The interviewer did not catch the mistake either and suggested changes to bring it down toO(n^2)
, even though merge sort on a linked list already runs inO(N log N)
.O(N log N) - How would you build a hash map and how would you write a hash function that creates a map for the keys?
Second round of coding
- Find the smallest value in the binary tree.
- Write C code that takes the words from a sentence and copies them into a 2D array, each word in a row. For the sentence
the output is Nvidia, is, a, cool and organization on 5 lines. This got a little messy: the sentence must be broken up, each word copied, and the memory adjusted in case the previously reserved space turns out too small.Nvidia is a cool organization. - In a grid of size
there are3x3
toA1
apps, and you should always keep the best 9 apps. How would you do it? The interviewer didn't say anything more about it. The candidate didn't ask any questions and went straight to the solution, which they say was a mistake. Their answer was a priority queue. When asked how this would work, they spent 20 minutes explaining how a heap inserts and removes a node. Then the interviewer said “oh, but that won’t keep things in order, right?” The candidate was lost. Can they come up with another data structure? After 10 more minutes they came up with a linked list and a map. This was the well-known LRU cache problem that they had only seen the day before and couldn't remember at the time. They explained how they would build it, and the interviewer didn't ask them for the code, and the round was over.A9
Design round
- You have 2 very large matrices that are multiplied together. How to reduce cache misses? They didn't know what to answer, since they had no clue how the cache would behave in this case.
- Then a long and confusing question about compilers. Compiler A calls the "invoke" module of compiler B 15 times, and each call takes several steps: starting a compiler instance takes 15% of the time, preprocessing and syntax analysis take 25% each, and optimization takes 35%. How would you reduce the time?
What is this question even asking? Does this mean that 15% becomes 10%? What does time reduction mean here? It took 25 minutes of talking to the interviewer to understand it. He wanted to hear whether all 15 calls needed a new compiler instance and whether preprocessing needed to be done each time.
Ready to ace your next interview?
InterviewMan gives you real-time AI answers during live interviews — undetectable on Zoom, Meet, and Teams.
Try InterviewMan FreeWhen the question was clear, the candidate answered all the questions. Check with an if whether the compiler was set up before. Pass a compiler instance to the invoke function as an argument. Keep a map with the preprocessing data and let flags track whether syntax analysis was done previously. The next question was whether it was possible to remove the if checks, and they said that you would need to look at the size of the map and such. In the end, this part went well.
Clang round
- For the candidate, no interview made more sense than this. She went over every detail of their project: how they handled the problem and which design patterns and data structures they used.
- She was curious about the work, and because the project was their own, they were able to answer anything she asked.
Director round, for culture fit
- The compiler director asked about the project, and then something like why would you want to work in such a complex and boring field. This upset them, and the candidate decided that this field was not for them.
- A week later, Nvidia said it was unhappy with the coding rounds and wanted one more.
The extra coding round
Turn a tree into a tree of sums. In this example, the root has the value 2, below it are 3 and 4, and below 3 are 5 and 7. After the conversion, the root becomes 21, and below it are 15 and 4, and 5 and 7 stay as is.
The candidate provided an
O(n^2) solution. The interviewer wanted O(n), and the candidate couldn't get it.
Result
Rejected.
How it felt
Mostly relief. Nvidia first talked to them in May and scheduled the first round on 17 September, then at the last minute delayed it until the following week because the interviewers weren't free. The candidate was glad that they did not take time off work early. On the same day, the first round did not take place at all because that interviewer was not present. And the people in the coding rounds didn't offer any hints. The last interviewer was the hardest: he was completely silent after asking.
Help with remote rounds
This page talks about the rounds that one candidate actually went through.
InterviewMan has desktop applications for Mac and Windows, as well as applications for iPhone and Android. Stealth Mode sends answers to your phone and keeps the app hidden on your laptop, and it also works with proctored online tests. We recommend it for real interviews, not just practice.
Download: InterviewMan for Mac, Windows, iPhone, Android and web ($12/mo on an annual plan or $30/mo, with a one-time free trial of 20 minutes and no card)
Ready to Ace Your Next Interview?
Join 570,000+ professionals using InterviewMan to get real-time AI assistance during their interviews.

