Interview Verified
Palo Alto Networks new grad loop
AskedMay 2026
ResultHire
SolvedSolved
RoundAll of them
Languagec++
PostedMay 16, 2026
Result: got offer
The loop had a few coding / ds rounds and one refactor / OOP-style round.
Round 1:
The interviewer asked me to design a data structure that supports:
add(data, time)
time is always given in increasing order.
delete(time)
Delete all entries with timestamp < time - 5.
getEarliest()
Return the earliest remaining data item.
The intended solution was basically a queue. Since timestamps are inserted in increasing order, expired elements are always at the front. On delete(time), repeatedly pop from the front while front.time < time - 5. Then the earliest valid data is just the front of the queue.
Round 2:
The second coding round gave variables n, k, and a list of intervals [start, end]. For every interval, every value from start to end is incremented by 1. Return true if the maximum value after all increments is <= k.
The tricky part is that n can be up to 1e9, so you cannot allocate an array of size n. The solution is to use a difference map / sweep line:
Add +1 at start.
Add -1 at end + 1.
Sort the event points.
Sweep from left to right while maintaining the current count.
If the current count ever exceeds k, return false.
Otherwise return true.
This is basically checking whether the maximum number of overlapping intervals is at most k.
Round 3: Refactor / OOP
I do not remember the exact prompt, but it involved taking some existing code or logic and improving the structure. The discussion was around designing clean classes / interfaces, separating responsibilities, and making the code easier to extend and maintain.
Tie-breaker round: HashMap design
asked to design a hashmap. The discussion was about implementing the core behavior of a hashmap from scratch, including how keys map to buckets and how to handle collisions. I talked through using an array of buckets, hashing the key to an index, chaining for collisions, and resizing / rehashing when the load factor gets too high.