Salesforce Array Coding Interview Questions
64 array coding problems are tagged as asked at Salesforce in interviews and online assessments reported by candidates. By difficulty they split into 11 basic, 36 intermediate and 17 advanced. The topics they most often combine with are Hash Table, Sorting, Sliding Window, Dynamic Programming.
Reported questions change over time and are not a guarantee of what you will be asked, so use the list to see which patterns Salesforce tends to test. For each problem, practise explaining your approach, its time and space cost and the edge cases before you write the code; every problem opens in an editor that runs your code against test cases.
Coding problems
- Two Sum (Basic)
- Best Time to Buy and Sell Stock (Basic)
- Maximum Subarray (Intermediate)
- Product of Array Except Self (Intermediate)
- Coin Change (Intermediate)
- Longest Increasing Subsequence (Advanced)
- Kth Largest Element (Intermediate)
- Missing Number (Basic)
- Subarray Sum Equals K (Intermediate)
- Container With Most Water (Intermediate)
- Trapping Rain Water (Advanced)
- Sort Colors (Basic)
- Find Pivot Index (Basic)
- Largest Rectangle in Histogram (Advanced)
- Coin Change Ways (Advanced)
- Search in a Rotated Sorted Array (Advanced)
- Merge Intervals (Intermediate)
- Candy Distribution (Advanced)
- Maximum Units on a Truck (Intermediate)
- Last Stone Weight (Intermediate)
- Subarrays With Product Less Than K (Intermediate)
- Maximum Product of Three (Basic)
- Find K Closest Elements (Intermediate)
- Minimum Edge Reversals Per Node (Intermediate)
- Maximum Product Subarray (Intermediate)
- Subarray Sum Equals K (Intermediate)
- Coin Change Ways (Intermediate)
- Partition Equal Subset Sum (Intermediate)
- House Robber II (Intermediate)
- Gas Station (Intermediate)
- Container With Most Water (Intermediate)
- Top K Frequent Values (Intermediate)
- Course Schedule Feasible (Intermediate)
- Network Delay Time (Advanced)
- Running Kth Largest (Intermediate)
- LRU Cache Operations (Basic)
- LFU Cache Operations (Intermediate)
- Median of Sliding Windows (Intermediate)
- Maximum Path Quality (Basic)
- Count Subarrays With Median K (Basic)
- Course Schedule Order (Intermediate)
- Operations to Make Network Connected (Intermediate)
- Burst Balloons (Advanced)
- Minimum Difficulty of a Job Schedule (Advanced)
- Delete and Earn (Intermediate)
- Min Stack Operations (Basic)
- Asteroid Collision (Intermediate)
- Number of Visible People in a Queue (Advanced)
- K Closest Points to Origin (Intermediate)
- Course Schedule III (Advanced)
- Least Unique Integers After K Removals (Intermediate)
- 3Sum Triplets (Intermediate)
- Sliding Window Maximum Values (Advanced)
- Median of Two Sorted Arrays (Advanced)
- Combination Sum (Intermediate)
- Combination Sum II (Intermediate)
- Collect Coins in a Tree (Advanced)
- Minimize Malware Spread (Advanced)
- Height Checker (Basic)
- Count the Number of Fair Pairs (Intermediate)
- Maximum Frequency Stack (Advanced)
- Beautiful Towers II (Advanced)
- Remove Stones to Minimize the Total (Intermediate)
- Running Median of Stream (Intermediate)
Related
- Salesforce coding interview questions
- Array problems
- Salesforce basic problems
- Salesforce intermediate problems
- Salesforce advanced problems
- Company interview roadmaps
- All interview guides
Frequently asked questions
How should I use the Salesforce problem list?
Start with the basic problems, then the intermediate and advanced ones, and note which topics repeat. Solve each under a timer, then read the explanation.
Are these the exact Salesforce interview questions?
They are problems candidates reported being asked. Companies rotate questions, so use them to learn the patterns, not to predict the exact question.