Veeva Systems·Software Engineer·Technical Phone Screen
Jun 2026
Veeva Systems coding round, one question the whole time. It was a topological sort problem dressed up with some extra requirements and I spent more time second-guessing my cycle detection than actually coding it.
- You're given a directed graph as an adjacency map where each key points to a list of tasks that depend on it. Implement a function that returns a valid execution order of all tasks reachable from a given starting node, with prerequisites always appearing first. Break ties alphabetically, detect any cycles, and explain the time and space complexity of your solution.
“The core of it is just topological sort with DFS and a visited set for cycle detection, but the alphabetical tie-breaking tripped me up.”