Salesforce Senior coding interview questions
These are the 6 coding questions YourAlly has tagged for Salesforce at Senior. On the YourAlly ladder this is Senior, the same level as Google L5, Meta E5 and Amazon L6.
A coding round at a large tech company usually runs 45 to 60 minutes with one or two problems. You write code that runs, test it on your own examples and state its time and space cost. At this level the bar is a correct, tested solution you reach mostly on your own, with the trade-offs said out loud.
Practice a mock Salesforce Senior coding loopPractice Salesforce coding questions
Fair-Share Async Job DispatchFree to read
One worker runs queued async jobs from many orgs. Whenever it is free, it picks from arrived jobs the org with the least runtime consumed so far (ties by smaller org id), then that org's earliest-arrived job (ties by index). Return the job indexes in execution order.
Input: org_ids = ["A","A","B"], arrivals = [0,0,1], durations = [5,5,2] Output: [0,2,1]
What a strong answer covers
- Per-org FIFO plus heap keyed by consumed runtime
- Explains why heap entries never go stale
- Handles idle time by jumping the clock
- Deterministic tie-breaking by org id then arrival and index
- O(n log n) analysis
5 more coding questions
- Formula Field Evaluation Order Locked
- Peak API Calls per Org Window Locked
- Range-Partition Orgs Across Pods Locked
- Records Visible Through Role Hierarchy Locked
- Unify Customer Profiles Locked
Related pages
More Salesforce Senior rounds
- System design 4 questions
- Behavioral 5 questions
Salesforce coding at other levels
- Staff 3 questions
- Senior staff 3 questions
Other companies at this level
- Adobe Senior 7 questions
- Airbnb Senior 4 questions
- Amazon L6 10 questions
- Anthropic Senior 6 questions
- Apple Senior 7 questions
- Cisco Senior 6 questions