Interview Intel · Salesforce

Salesforce coding interview
questions, leaked.

138 problems reported across recent Salesforce interviews. Top patterns: array, string, hash table. The list below is what most candidates actually saw, plus the honest play if you can't grind all of it.

Founder's read

Salesforce's interview loop hits you with 138 reported problems, skewed hard toward arrays (78 occurrences) and strings (43). The difficulty split is brutal: 87 medium, 30 hard, only 21 easy. You're not grinding fundamentals here. You're prepping for constraint problems, cache design, and substring manipulation under pressure. If you freeze on a hash-table or DP pattern mid-assessment, StealthCoder runs invisible during the OA and surfaces a working solution in seconds. That's your real safety net.

Tracked problems
138
Easy
21/ 15%
Medium
87/ 63%
Hard
30/ 22%

Top problems at Salesforce

leaked_problems.csv50 rows
#ProblemDiffFrequency
01Count Subarrays With Median KHARD
0.0
02Minimum Operations to Reduce an Integer to 0MEDIUM
0.0
03Word BreakMEDIUM
93.6
04Subarray Product Less Than KMEDIUM
87.3
05String CompressionMEDIUM
84.8
06Distinct SubsequencesHARD
80.4
07LFU CacheHARD
80.4
08Merge IntervalsMEDIUM
80.4
09LRU CacheMEDIUM
78.8
10Group AnagramsMEDIUM
75.1
11Number of IslandsMEDIUM
75.1
12Optimal Account BalancingHARD
0.0
13Report Spam MessageMEDIUM
0.0
14Longest Common SubsequenceMEDIUM
0.0
15Palindromic SubstringsMEDIUM
73.0
16Longest Substring Without Repeating CharactersMEDIUM
73.0
17Design a Text EditorHARD
73.0
18Maximum Frequency StackHARD
73.0
19Count the Number of Fair PairsMEDIUM
73.0
20Height CheckerEASY
73.0
21Course Schedule IIMEDIUM
70.8
22Check If a Number Is Majority Element in a Sorted ArrayEASY
70.8
23Beautiful Towers IMEDIUM
70.8
24Beautiful Towers IIMEDIUM
70.8
25Check Whether Two Strings are Almost EquivalentEASY
70.8
26Best Time to Buy and Sell StockEASY
68.3
27Split Array Largest SumHARD
68.3
28Trapping Rain WaterHARD
68.3
29Valid ParenthesesEASY
68.3
30Binary Tree Maximum Path SumHARD
65.5
31Kth Largest Element in an ArrayMEDIUM
65.5
32Beautiful ArrangementMEDIUM
65.5
33Maximum Product of Three NumbersEASY
62.3
34Asteroid CollisionMEDIUM
62.3
35Largest NumberMEDIUM
62.3
36Integer to RomanMEDIUM
62.3
37Longest Palindromic SubstringMEDIUM
58.6
38Minimum Window SubstringHARD
58.6
39Count Palindromic SubsequencesHARD
58.6
40Meeting Rooms IIMEDIUM
58.6
41Task SchedulerMEDIUM
58.6
42Coin ChangeMEDIUM
58.6
433SumMEDIUM
58.6
44Validate Binary Search TreeMEDIUM
54.3
45Min StackMEDIUM
54.3
46Decode WaysMEDIUM
54.3
47Top K Frequent ElementsMEDIUM
54.3
48Maximal SquareMEDIUM
54.3
49Decode StringMEDIUM
49.0
50Degree of an ArrayEASY
49.0

Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.

The hedge

You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual Salesforce OA. The proctor cannot see it. Screen share cannot detect it. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop.

Get StealthCoder
Topic distribution
What this means

Arrays dominate the distribution, but this isn't about basic iteration. Problems like Count Subarrays With Median K and Subarray Product Less Than K demand prefix sums, sliding windows, and careful edge-case handling. Strings are the second pillar: Group Anagrams, String Compression, and Distinct Subsequences mix hashing, two-pointers, and DP. Hash-table and dynamic-programming questions (34 and 33 respectively) often collide on problems like Word Break and LRU Cache, forcing you to recognize both the data structure and the recurrence relation at once. Design problems (LFU Cache, LRU Cache) are harder than they look. Drill arrays and strings first, then lock in DP patterns, because when you hit a wall on the live OA, you won't have time to reverse-engineer the recurrence.

Companies with similar patterns

If you prepped for Salesforce, these companies recycle ~60% of the same topics.

The honest play

You've seen the list. Now make sure you pass Salesforce.

Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Salesforce interview FAQ

How many array problems should I solve before a Salesforce OA?+

Array problems appear in 78 of 138 reported questions, often paired with other patterns like hash-table or prefix sum. Aim to solve at least 20-25 unique array problems, prioritizing sliding window and prefix-sum variants. Subarray Product Less Than K and Count Subarrays With Median K are representative of Salesforce difficulty.

Are dynamic programming problems essential for Salesforce?+

Yes. DP appears in 33 problems and frequently intertwines with strings and arrays. Word Break, Distinct Subsequences, and Longest Common Subsequence are common. Expect at least one hard DP problem. Practice memoization and bottom-up approaches on strings and subarrays before your OA.

Should I study design (cache) problems?+

Absolutely. LRU Cache and LFU Cache are on the reported list and are medium-to-hard design questions. They test your grasp of hash-tables, linked lists, and system thinking. Spend at least a few hours on cache eviction logic and doubly-linked list manipulation.

What's the easiest way to avoid bombing a medium hash-table problem?+

Hash-table problems (34 reported) often boil down to recognizing when you need a frequency map or grouping. Group Anagrams and Report Spam Message are examples. If you can't recall the pattern during the OA, you'll blank. StealthCoder catches that in real time and shows you the working solution.

Is two-pointers worth drilling heavily?+

It appears in 17 problems, much lower than arrays or strings, but two-pointers is fast to master and shows up in String Compression, Merge Intervals, and Palindromic Substrings. Spend a few hours on it, then shift focus to DP and hash-table problems where Salesforce's harder rounds concentrate.

Problem frequencies sourced from public community-maintained interview-report repos. Problems, ratings, and trademarks are property of LeetCode and Salesforce. StealthCoder is not affiliated with Salesforce.