•CODING INTERVIEW QUESTIONS
Salesforce Coding Interview Questions (DSA)
50 DSA problems sourced from real Salesforce interviews
Salesforce Coding Interview Questions
| Problem | Difficulty | Tags |
|---|---|---|
| Distance to a Cycle in Undirected Graph | Hard | Depth-First SearchBreadth-First SearchGraph Theory |
| Sum of Matrix After Queries | Medium | ArrayHash Table |
| Minimum Operations to Reduce an Integer to 0 | Medium | Dynamic ProgrammingGreedyBit Manipulation |
| Time Needed to Rearrange a Binary String | Medium | StringDynamic ProgrammingSimulation |
| String Compression | Medium | Two PointersString |
| Minimum Edge Reversals So Every Node Is Reachable | Hard | Dynamic ProgrammingDepth-First SearchBreadth-First Search |
| Maximum Team Size with Overlapping Intervals | Medium | |
| Medium | ArrayHash TablePrefix Sum | |
| Maximum Product of Three Numbers | Easy | ArrayMathSorting |
| Medium | ArraySortingQuicksort | |
| Minimum Removals to Balance Array | Medium | ArrayBinary SearchSliding Window |
| Fruit Into Baskets | Medium | ArrayHash TableSliding Window |
| Medium | Depth-First SearchBreadth-First SearchGraph Theory | |
| Optimal Account Balancing | Hard | ArrayDynamic ProgrammingBacktracking |
| Asteroid Collision | Medium | ArrayStackSimulation |
| Amount of Time for Binary Tree to Be Infected | Medium | Hash TableTreeDepth-First Search |
| Medium | ArrayTwo PointersGreedy | |
| Count Vowel Substrings of a String | Easy | Hash TableString |
| Put Marbles in Bags | Hard | ArrayGreedySorting |
| LFU Cache | Hard | Hash TableLinked ListDesign |
| Maximum Palindromes After Operations | Medium | ArrayHash TableString |
| Strange Printer | Hard | StringDynamic Programming |
| Generate Parentheses | Medium | StringDynamic ProgrammingBacktracking |
| Remove Stones to Minimize the Total | Medium | ArrayGreedyHeap (Priority Queue) |
| Minimum Replacements to Sort the Array | Hard | ArrayMathGreedy |
| Angle Between Hands of a Clock | Medium | Math |
| Remove All Adjacent Duplicates in String II | Medium | StringStack |
| Vertical Order Traversal of a Binary Tree | Hard | Hash TableTreeDepth-First Search |
| Partition Array Into Two Arrays to Minimize Sum Difference | Hard | ArrayTwo PointersBinary Search |
| Hard | Linked ListDivide and ConquerHeap (Priority Queue) | |
| Palindrome Partitioning | Medium | StringDynamic ProgrammingBacktracking |
| Medium | ArrayBreadth-First SearchMatrix | |
| Jump Game II | Medium | ArrayDynamic ProgrammingGreedy |
| Last Stone Weight | Easy | ArrayHeap (Priority Queue) |
| Medium | Hash TableStringSliding Window | |
| Medium | Two PointersStringDynamic Programming | |
| Medium | ArrayTwo PointersGreedy | |
| Integer to Roman | Medium | Hash TableMathString |
| Medium | ArrayTwo PointersSorting | |
| Medium | ArrayBinary Search | |
| Combination Sum | Medium | ArrayBacktracking |
| Hard | ArrayTwo PointersDynamic Programming | |
| Medium | ArrayHash TableString | |
| Minimum Window Substring | Hard | Hash TableStringSliding Window |
| Medium | TreeDepth-First SearchBinary Search Tree | |
| Distinct Subsequences | Hard | StringDynamic Programming |
| Binary Tree Maximum Path Sum | Hard | Dynamic ProgrammingTreeDepth-First Search |
| Easy | ArrayDynamic Programming | |
| Medium | Hash TableLinked ListDesign | |
| Min Stack | Medium | StackDesign |
Difficulty Breakdown
Top Data Structures & Patterns
Frequently Asked Questions
What questions does Salesforce ask in coding interviews?
Salesforce coding interviews focus on Array, Backtracking, Binary Search, Binary Search Tree, and other data structure problems. We compiled 50 questions from real Salesforce interviews. The most common topics are Array, Backtracking, Binary Search, Binary Search Tree, Binary Tree. Filter by topic to see what comes up most often.
How many Salesforce coding interview questions are there?
InterviewSkool has 50 Salesforce coding interview questions: 4 Easy, 32 Medium, and 14 Hard. Most Salesforce interviews focus on Medium-difficulty problems, so prioritize those in your prep.
How should I prepare for Salesforce coding interviews?
Start with Medium difficulty problems. Group by topic (Array, Tree, DP) to build pattern recognition. Aim to solve 30 to 40 problems before your interview. Then practice under pressure with a mock interview.
Are Salesforce coding interview questions free?
Yes. All 50 Salesforce coding interview questions are free to browse with no sign-up required. You can filter by difficulty and topic tags. Start a mock interview with a free credit to practice under real pressure.
Practice with a Mock Interview
Simulate real Salesforce interview pressure with our AI interviewer.
Start Mock Interview →