Coding interview questions

Salesforce Hard Coding Interview Questions (DSA)

The 14 hard DSA problems Salesforce has asked most in the last six months, most-asked first. Switch tabs to see the rest of the 50. Tick them off as you go.

Practice a Salesforce interview with me

I'm Alex. I'll pick 2 problems from Salesforce's list at your level and interview you like a real Salesforce round.

14hard problems
14full breakdowns
50Salesforce problems in all

By difficulty: All (50) · Easy (4) · Medium (32) · Hard (14)

Start Salesforce Mock Interview→

Topics

2204.Distance to a Cycle in Undirected Graph
Full breakdownDepth-First SearchBreadth-First SearchGraph Theory
2858.Minimum Edge Reversals So Every Node Is Reachable
Full breakdownDynamic ProgrammingDepth-First SearchBreadth-First Search
465.Optimal Account Balancing
Full breakdownArrayDynamic ProgrammingBacktracking
2551.Put Marbles in Bags
Full breakdownArrayGreedySorting
460.LFU Cache
Full breakdownHash TableLinked ListDesign
Hard+1▶ Mock
664.Strange Printer
Full breakdownStringDynamic Programming
987.Vertical Order Traversal of a Binary Tree
Full breakdownHash TableTreeDepth-First Search
2035.Partition Array Into Two Arrays to Minimize Sum Difference
Full breakdownArrayTwo PointersBinary Search
23.Merge k Sorted Lists
Full breakdownLinked ListDivide and ConquerHeap (Priority Queue)
Hard+4▶ Mock
42.Trapping Rain Water
Full breakdownArrayTwo PointersDynamic Programming
Hard+6▶ Mock
76.Minimum Window Substring
Full breakdownHash TableStringSliding Window
Hard+1▶ Mock
115.Distinct Subsequences
Full breakdownStringDynamic Programming
124.Binary Tree Maximum Path Sum
Full breakdownDynamic ProgrammingTreeDepth-First Search

Frequently Asked Questions

What hard Salesforce coding questions are most common?

InterviewSkool has 14 hard Salesforce coding questions. Focus on the top 10 to 15 most common problems for the best ROI.

How many hard questions does Salesforce have?

Salesforce has 14 hard coding questions out of 50 total. Hard problems are less common but can appear in senior-level interviews.

Are these Salesforce hard questions free?

Yes. All 14 hard Salesforce coding questions are free to browse. No sign-up required. Filter by topic and click any problem to open it on LeetCode.

Practice with a Mock Interview

Simulate real Salesforce interview pressure with our AI interviewer.

Start Mock Interview →