InterviewLegend

Trees & Graphs

Alex Chen32 min readUpdated 36 real interview reports

Graphs are close to the center of what Palantir builds, so a graph problem in the coding round is rarely a side quest. The Ontology, the layer that sits over a customer's integrated data, models the world as objects joined by links. A person is linked to the vehicle they drive, a shipment to the port it passed through, a transaction to the account it settled in. Ask which records describe the same real entity, which datasets have to rebuild when an input changes, or how fast a signal spreads through a contact network, and you are asking a graph question. The problems in this round tend to carry that flavor rather than an abstract puzzle.

Three moves cover most of what shows up. You walk the graph with depth-first or breadth-first search to find connected components. You topologically sort a directed acyclic graph to order it by its dependencies. And you run a breadth-first search from many sources at once to measure how something spreads. The traversal underneath is always the same handful of steps; what changes is the bookkeeping you layer on top and the failure case you have to name. Learn the three skeletons cold and the work in the room becomes reading the real graph out of the story and getting the visited rule and the termination check exact.

PalantirPremium lesson · Coding round

The 3 Palantir problems are below.

  1. A Premium questionCoding · Medium
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

Each with hints, the follow-up and a tested solution.

Get the Palantir questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

Had your Palantir interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Palantir interview guide

Know what Palantir asks before you walk in.

20 coding · 6 system design · 17 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.