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
- #1easyfrequently asked
1. Two Sum
Given an array of integers and a target, return indices of the two numbers that sum to target. Palantir asks this early as a warm-up to gauge whether you reach for hash-map lookups immediately or default to nested loops, since their ETL pipelines join entities by key constantly.
- #2easyfrequently asked
2. Valid Parentheses
Determine if a string of brackets is balanced and properly nested. Palantir uses this to probe whether you reach for a stack immediately, since their Foundry expression parser and ontology query language need balanced delimiter validation.
- #13easyfrequently asked
13. Best Time to Buy and Sell Stock
Given an array prices where prices[i] is the price of a given stock on day i, find the maximum profit from a single buy/sell. Palantir uses this to test whether you spot the running-min-then-diff streaming pattern they apply to anomaly detection across time-series rows in a Foundry dataset.