Skip to main content

Palantir Coding Interview Questions

25 Palantir coding interview problems with full optimal solutions — 15 easy, 7 medium, 3 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Palantir interviewer values, and a FAQ section.

Showing 3 problems of 25

  • #23hardsometimes asked

    23. Binary Tree Maximum Path Sum

    A path in a binary tree is any sequence of nodes connected by edges; return the maximum sum across all such paths. Palantir asks this to see whether you separate the value RETURNED from a recursive call from the value RECORDED at each node — the same split they use when computing aggregated weights along ontology paths under row-level ACL.

  • #24hardsometimes asked

    24. Alien Dictionary

    Given a list of words sorted lexicographically by an alien language, derive the character order. Palantir asks this because it's the textbook example of inferring a partial order from observed pairs — exactly what their ontology system does when reconciling type hierarchies from disparate source systems during entity resolution.

  • #25hardrarely asked

    25. Longest Cycle in a Graph

    Given a directed graph where each node has at most one outgoing edge, return the length of the longest cycle. Palantir asks this because their ontology validator must detect cycles in foreign-key constraints — and when each entity points to exactly one parent, the cycle search shape is precisely this problem.

Palantir Coding Interview Questions — Full Solutions — InterviewChamp.AI