YourAlly

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

  1. Formula Field Evaluation Order Locked
  2. Peak API Calls per Org Window Locked
  3. Range-Partition Orgs Across Pods Locked
  4. Records Visible Through Role Hierarchy Locked
  5. Unify Customer Profiles Locked

Sign up free to practice all 6

Related pages

More Salesforce Senior rounds

Salesforce coding at other levels

Other companies at this level