Problem database last updated: June 20, 2025

PPalantir Technologies logo

Palantir Technologies Coding Interview Questions

25 problems · 7 Easy, 12 Medium, 6 Hard · Ranked #81 of 458

Difficulty breakdown

7 Easy

28% · avg 23%

12 Medium

48% · avg 59%

6 Hard

24% · avg 18%

Top topics

array
72%
sorting
28%1.9x
string
20%
hash-table
20%
breadth-first-search
20%2.4x
matrix
16%1.8x

Interview profile

Based on 25 reported problems, Palantir Technologies interviews are slightly harder than average - 24% Hard vs 18% across all companies.

Compared to the industry average, Palantir Technologies puts unusual emphasis on rolling-hash (8% of problems, 21.4x the industry average), hash-function (8% of problems, 13.8x the industry average), merge-sort (8% of problems, 10.9x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (72%), sorting (28%), string (20%), hash-table (20%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 25 problems

Find Beautiful Indices in the Given Array I

Solve

You are given a 0-indexed string s, a string a, a string b, and an integer k.

MediumVery Likely
two-pointersstringbinary-search

Find Beautiful Indices in the Given Array II

Solve

You are given a 0-indexed string s, a string a, a string b, and an integer k.

HardVery Likely
two-pointersstringbinary-search

Integer to English Words

Solve

Convert a non-negative integer num to its English words representation.

HardVery Likely
mathstringrecursion

Minimum Time Difference

Solve

Given a list of 24-hour clock time points in "HH:MM" format, return the minimum minutes difference between any two time-points in the list.

MediumVery Likely
arraymathstring

LRU Cache

Solve

Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.

MediumVery Likely
hash-tablelinked-listdesign

Contains Duplicate II

Solve

Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <=...

EasyVery Likely
arrayhash-tablesliding-window

Range Sum Query - Immutable

Solve

Given an integer array nums, handle multiple queries of the following type:

EasyVery Likely
arraydesignprefix-sum

Selling Pieces of Wood

Solve

You are given two integers m and n that represent the height and width of a rectangular piece of wood. You are also given a 2D integer array prices, where price...

HardVery Likely
arraydynamic-programmingmemoization

Contains Duplicate

Solve

Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.

EasyVery Likely
arrayhash-tablesorting

Single Number

Solve

Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.

EasyVery Likely
arraybit-manipulation

Contains Duplicate III

Solve

You are given an integer array nums and two integers indexDiff and valueDiff.

HardVery Likely
arraysliding-windowsorting

Check If It Is a Straight Line

Solve

You are given an integer array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight li...

EasyVery Likely
arraymathgeometry

Merge k Sorted Lists

Solve

You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.

HardLikely
linked-listdivide-and-conquerheap-priority-queue

Merge Intervals

Solve

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...

MediumLikely
arraysorting

Construct Quad Tree

Solve

Given a n n matrix grid of 0's and 1's only. We want to represent grid with a Quad-Tree.

MediumLikely
arraydivide-and-conquertree

Find Players With Zero or One Losses

Solve

You are given an integer array matches where matches[i] = [winneri, loseri] indicates that the player winneri defeated player loseri in a match.

MediumLikely
arrayhash-tablesorting

Minimum Equal Sum of Two Arrays After Replacing Zeros

Solve

You are given two arrays nums1 and nums2 consisting of positive integers.

MediumLikely
arraygreedy

Daily Temperatures

Solve

Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait aft...

MediumSometimes
arraystackmonotonic-stack

Best Time to Buy and Sell Stock

Solve

You are given an array prices where prices[i] is the price of a given stock on the ith day.

EasySometimes
arraydynamic-programming

Flood Fill

Solve

You are given an image represented by an m x n grid of integers image, where image[i][j] represents the pixel value of the image. You are also given three integ...

EasySometimes
arraydepth-first-searchbreadth-first-search

Trapping Rain Water II

Solve

Given an m x n integer matrix heightMap representing the height of each unit cell in a 2D elevation map, return the volume of water it can trap after raining.

HardSometimes
arraybreadth-first-searchheap-priority-queue

Sort List

Solve

Given the head of a linked list, return the list after sorting it in ascending order.

MediumSometimes
linked-listtwo-pointersdivide-and-conquer

Accounts Merge

Solve

Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are...

MediumSometimes
arrayhash-tablestring

All Ancestors of a Node in a Directed Acyclic Graph

Solve

You are given a positive integer n representing the number of nodes of a Directed Acyclic Graph (DAG). The nodes are numbered from 0 to n - 1 (inclusive).

MediumSometimes
depth-first-searchbreadth-first-searchgraph

Number of Islands

Solve

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

MediumSometimes
arraydepth-first-searchbreadth-first-search

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Palantir Technologies interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Palantir Technologies coding interview

Palantir Technologies interviews focus heavily on array, sorting, string problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. Palantir Technologies interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does Palantir Technologies ask in interviews?add

Palantir Technologies has been reported to ask 25 distinct coding problems. The most common topics are array, sorting, string. 7 are Easy difficulty, 12 are Medium, and 6 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Palantir Technologies coding interviews?add

Based on 25 reported problems, Palantir Technologies interviews are slightly harder than average - 24% Hard vs 18% across all companies. 48% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a Palantir Technologies coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, sorting, string. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your Palantir Technologies interview?

Simulate a real Palantir Technologies coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a Palantir Technologies interview with AIarrow_forward