Interview blog

Palantir LeetCode Questions: What the Tagged List Shows

Written March 17, 2026Updated November 12, 202611 min read
Top 30 Most Common Palantir LeetCode Interview Questions You Should Prepare For

The 29 problems LeetCode tagged for Palantir, grouped by pattern, one worked solution, and the interview rounds LeetCode practice will not cover.

The most recent public snapshot of Palantir LeetCode questions, from June 2025, lists 29 problems: 16 medium, 7 easy and 6 hard. The top of the list is Find Beautiful Indices in the Given Array I and II, Minimum Time Difference, Integer to English Words and LRU Cache. Most of the list is arrays, hash maps and string scanning, with a handful of grid and graph problems. That list is worth working through, but it only prepares you for one part of the loop. Candidate reports describe a Palantir onsite built around problem decomposition and reading unfamiliar code, and interviewing.io, writing from conversations with Palantir engineers, says plainly that LeetCode preparation is not enough on its own.

Before working through the list, it helps to know where coding sits in the loop, which our software engineer interview process guide explains round by round.

Where the list comes from, and how much to trust it

LeetCode's company tags have been a premium feature, so the lists most people find through search are copies kept in public GitHub repositories, and they go stale.

Three versions show how much the Palantir tag has moved:

  • A 2022 repository built from LeetCode's company tags listed two Palantir problems: Check If It Is a Straight Line and UTF-8 Validation.
  • The same kind of list, updated on 20 June 2025 in a different repository, has 29 problems. Its three-month view holds only two of them, Find Beautiful Indices I and Merge Intervals.
  • In that repository's June 2026 update, the Palantir files contain a header row and nothing else.

So the 29-problem list is more than a year old, and nobody outside LeetCode can tell you how many reports sit behind each entry. The "frequency" column in these files is a relative score, not a count. Treat the list as a map of the patterns Palantir interviewers have reached for, not as a forecast of your question.

The 29 problems, grouped by what they test

Grouping by pattern is more useful than working down the list in order, because the same two or three ideas carry most of it.

Matching inside a distance limit (strings and indices)

  • Find Beautiful Indices in the Given Array I (medium) and II (hard)
  • Shortest Word Distance III (medium)
  • Contains Duplicate II (easy) and Contains Duplicate III (hard)

Hash maps, counting and prefix sums

  • Contains Duplicate (easy), Single Number (easy)
  • Maximum Size Subarray Sum Equals k (medium), Range Sum Query - Immutable (easy)
  • Number of Divisible Triplet Sums (medium)
  • Find Players With Zero or One Losses (medium)
  • Count the Number of Good Subsequences (medium)

Sorting, intervals and greedy choices

  • Merge Intervals (medium), Minimum Time Difference (medium)
  • Minimum Equal Sum of Two Arrays After Replacing Zeros (medium)
  • Daily Temperatures (medium), Best Time to Buy and Sell Stock (easy)
  • Check If It Is a Straight Line (easy)

Parsing and formatting

  • Integer to English Words (hard)

Design and linked lists

  • LRU Cache (medium), Merge k Sorted Lists (hard), Sort List (medium)

Grids and graphs

  • Flood Fill (easy), Number of Islands (medium), Construct Quad Tree (medium)
  • Accounts Merge (medium), All Ancestors of a Node in a Directed Acyclic Graph (medium)
  • Trapping Rain Water II (hard)

Dynamic programming

  • Selling Pieces of Wood (hard)

Two things stand out. First, a cluster of problems asks the same question in different clothes: is there a matching item within k positions of this one? Both Beautiful Indices problems and Contains Duplicate II and III reward the same habit of collecting positions and then searching them efficiently. Second, several problems read like cleaning up records rather than puzzles. Minimum Time Difference parses clock strings, Find Players With Zero or One Losses tallies match results, and Accounts Merge joins user records that share an email address. That fits what TechPrep reports about the onsite coding round: problems that often involve complex constraints or messy, real-world style inputs, with practice prompts such as user session analysis and badge access logs.

There is very little dynamic programming and no tree-heavy problems beyond Construct Quad Tree. If your preparation time is short, spend it on hash maps, sorted position lists and graph traversal.

Worked example: Find Beautiful Indices I

This is the problem at the top of both the full list and the three-month list, so it is the one to know cold.

The problem. You get a string s, two short strings a and b, and an integer k. An index i is "beautiful" if a starts at i and b starts at some index j with |i - j| <= k. Return the beautiful indices in sorted order. In version I, a and b are at most 10 characters and s is at most 100,000.

The approach. Split it into two smaller problems, out loud, before writing code:

  1. Find every position where a starts and every position where b starts. Because the patterns are at most 10 characters, a direct scan is fine: about one million character comparisons in the worst case.
  2. For each a position i, ask whether any b position falls in [i - k, i + k]. The b positions come out of the scan already sorted, so binary search finds the first one at or after i - k, and you check whether it is still at or before i + k.
from bisect import bisect_left

def beautiful_indices(s, a, b, k):
    def starts(p):
        return [i for i in range(len(s) - len(p) + 1) if s.startswith(p, i)]

    a_idx, b_idx = starts(a), starts(b)
    result = []
    for i in a_idx:
        pos = bisect_left(b_idx, i - k)  # first b-match at or after i - k
        if pos < len(b_idx) and b_idx[pos] <= i + k:
            result.append(i)
    return result

Scanning costs O(n · m), where m is the pattern length, and the checks cost O(A log B) for A matches of a and B matches of b. Because both index lists are sorted, a two-pointer sweep gets the second step down to O(A + B), and that is a good follow-up to offer before the interviewer asks.

What the follow-up usually is. Version II is the same problem with patterns as long as s itself, up to 500,000 characters. The direct scan becomes too slow, and you need a linear-time string matcher such as KMP, the Z-function or a rolling hash to find the starting positions. The second step does not change. If you explain the solution as "find positions, then search positions", the follow-up only replaces step one, and you can say so.

How to talk through it. Test the edge cases before the interviewer raises them: a equal to b (an index can match itself, since |i - i| = 0), no matches for b at all, and matches at the very end of s. Name the complexity of each step separately. If the interviewer recasts the problem as something product-like, such as finding log entries where two events happen close together, the structure carries over unchanged.

Why the LeetCode list covers only part of the loop

Public accounts of Palantir's software engineering process do not agree on every detail, and none of them comes from Palantir. Read the following as a composite of what interviewing.io, TechPrep and Design Gurus report, not as an official description:

  • Recruiter screen, about 30 minutes. Motivation and fit. interviewing.io says recruiters filter out more candidates at this stage than most companies do, and several guides advise being ready to discuss Palantir's government and defense work.
  • Technical screen, about an hour of live coding. interviewing.io describes it as roughly half algorithms, half behavioral, in CodePair. TechPrep says it may run through Karat or a Palantir engineer, with long, narrative prompts where you gather requirements before coding. This is where the tagged list helps most.
  • Onsite, several rounds of about an hour each. interviewing.io describes three rounds drawn from four types: problem decomposition (almost always included), coding, system design and re-engineering, with around 20 minutes of behavioral questions in each one. Design Gurus and TechPrep also describe a learning round, where you pick up an unfamiliar library or tool and use it on the spot.
  • Hiring manager round, where reports describe a deep dive into your past projects, a values and motivation conversation, and sometimes a revisit of areas earlier rounds flagged.

Only the technical screen and the coding round look like LeetCode. The others test different skills:

  • Decomposition gives you a deliberately vague product problem and watches how you scope it. interviewing.io's example asks how you would design technology to help elderly people with poor vision cook for themselves. TechPrep lists a taxi dispatch system and a hospital patient record system. You are judged on the questions you ask, the pieces you break the problem into and how you adapt when the interviewer adds a constraint, and often you write no real code.
  • Re-engineering hands you a few hundred lines of existing code to understand, debug or extend. interviewing.io warns of red herrings. Reading other people's code quickly is a different muscle from writing your own from a blank file.
  • Learning measures how fast you absorb something new. Design Gurus describes it as the core trait for forward deployed engineer roles, whose loops lean more on decomposition and learning than pure software engineering loops do.

The tagged list does help indirectly here. The "positions, then search" habit from the worked example is exactly the kind of decomposition interviewers want to hear in every round.

A two-week plan

Days 1 to 5: the tagged patterns. Work the distance-limit cluster first, then hash maps and prefix sums, then the grid and graph problems. For each problem, spend the first two minutes restating it and asking clarifying questions, even when practising alone. Palantir's prompts are reported to start vague on purpose, and the habit has to be automatic.

Days 6 and 7: the hard ones. Find Beautiful Indices II forces you to learn one linear-time string matcher properly. Integer to English Words punishes sloppy edge cases such as zero and the gaps in "One Million Ten". Trapping Rain Water II is a priority-queue problem on a grid.

Days 8 to 10: decomposition. Take the prompts above, set a 15-minute timer, and talk through users, requirements, data model, the main components and what you would build first. Then have a friend add a constraint halfway through, such as a warehouse going offline or a new privacy rule, and adjust.

Days 11 and 12: reading code. Pick a 300- to 500-line file from an open-source project you have never seen, give yourself 30 minutes to explain what it does, and then find or plant a bug and fix it. Narrate as you go.

Days 13 and 14: behavioral and mission. Prepare short stories for each round, because behavioral questions reportedly appear throughout the onsite, not in one slot. Have an honest, specific answer for why you want to work at Palantir, including how you think about its defense and government customers.

If you want a second opinion on your practice solutions, Verve AI's Coding Copilot captures a problem from your screen and returns a solution in your chosen language, with quick actions such as Edge Case and Complexity. It is most useful after your own attempt, as a check on the edge cases and complexity analysis you missed.

For broader practice, the 30 most common LeetCode interview questions cover the general patterns, and if your technical screen is run by Karat, the Karat interview questions guide explains that format.

Sources

  • Palantir tag list, 20 June 2025 snapshot (29 problems, difficulties, order): https://github.com/liquidslr/leetcode-company-wise-problems/blob/a0c0e0fbe798c03e5bb4c46fe9a8573ae4645c39/Palantir%20Technologies/5.%20All.csv
  • Palantir three-month list in the same snapshot (Find Beautiful Indices I, Merge Intervals): https://github.com/liquidslr/leetcode-company-wise-problems/blob/a0c0e0fbe798c03e5bb4c46fe9a8573ae4645c39/Palantir%20Technologies/2.%20Three%20Months.csv
  • Palantir files in the June 2026 update contain only a header row: https://github.com/liquidslr/leetcode-company-wise-problems/blob/main/Palantir%20Technologies/5.%20All.csv
  • 2022 list with two Palantir problems: https://github.com/hxu296/leetcode-company-wise-problems-2022/blob/main/companies/Palantir%20Technologies.csv
  • Find Beautiful Indices I statement and constraints: https://leetcode.com/problems/find-beautiful-indices-in-the-given-array-i/
  • Find Beautiful Indices II constraints (patterns up to 5 × 10^5 characters): https://leetcode.com/problems/find-beautiful-indices-in-the-given-array-ii/
  • Rounds, CodePair, behavioral time in each onsite round, the elderly-cooking decomposition prompt, red herrings in re-engineering, "LeetCode prep isn't going to be enough": https://interviewing.io/palantir-interview-questions
  • Karat or internal engineer for the screen, narrative prompts, messy real-world inputs, taxi dispatch and hospital record prompts, codebase size: https://www.techprep.app/blog/palantir-interview-process
  • Learning round, forward deployed engineer emphasis, 15-minute decomposition practice: https://www.designgurus.io/answers/detail/what-is-the-palantir-interview-process-like-round-by-round
  • Coding Copilot capture, languages and quick actions: https://docs.vervecopilot.com/features/coding-copilot
R

Ryan

CEO of Verve AI

Related reads

Explore related blog posts

Software Engineer Interview Process: Every Round Explained
November 12, 2026Interview blog

Software Engineer Interview Process: Every Round Explained

The software engineer interview process round by round: what each stage tests, how it differs by employer and level, and how long it takes.

Read story
pexels yankrukov 7693734
April 30, 2026Interview blog

Atlassian Interview Questions: Coding, Design and Values

What Atlassian asks in each round, the problems its LeetCode tag repeats, and its new AI-enabled code design round, with a worked example.

Read story
Top 30 Most Common ByteDance LeetCode Interview Questions You Should Prepare For
February 14, 2026Interview blog

ByteDance Interview Questions: What the LeetCode Data Shows

What ByteDance says about its hiring process, which LeetCode problems its company tag lists most, and a worked LRU Cache answer to practise from.

Read story
Top 30 Most Common Salesforce Coding Interview Questions You Should Prepare For
February 9, 2026Interview blog

Salesforce Coding Interview Questions: Apex and SWE Rounds

Two tests share this name: Apex rounds for Salesforce developer jobs, and coding at Salesforce itself. What each asks, with a worked trigger fix.

Read story
group people working out business plan office
April 30, 2026Interview blog

Robinhood Interview Questions: What the LeetCode Data Shows

Robinhood's coding rounds, the 15 problems on LeetCode's Robinhood tag, and worked answers to the referral leaderboard and fractional-share questions.

Read story
Can Cracking The Coding Be Your Secret Weapon For Acing Any Professional Interview
November 12, 2026Interview prep guide

Coding Interview Preparation: Plans for 2, 4 or 8 Weeks

Coding interview preparation that fits your calendar: 2, 4 and 8-week plans, a routine for practising one problem, and how to adjust for each employer.

Read guide
Best AI interview copilot for journalism and writing jobs
February 19, 2026Interview blog

Best AI interview copilot for journalism and writing jobs

Top AI interview copilots for journalism and writing jobs — improve prep, answers, and storytelling.

Read story
What is the best AI interview copilot for JPMorgan interviews?
February 12, 2026Interview blog

What is the best AI interview copilot for JPMorgan interviews?

Compare top AI interview copilots tailored for JPMorgan interviews — features, pros, cons, and best picks.

Read story
Best AI interview copilot for leadership roles
February 21, 2026Interview blog

Best AI interview copilot for leadership roles

Discover the best AI interview copilot for leadership roles - improve preparation, feedback, and hiring outcomes.

Read story

Walk into every interview prepared and confident

Get Started For Free

Available on Mac, Windows, browser and mobile