Salesforce Senior Principal coding interview questions
These are the 3 coding questions YourAlly has tagged for Salesforce at Senior Principal. Senior Principal is the common India title for this level. YourAlly treats it as Senior staff, the same level as Google L7, Meta E7 and Amazon L8.
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 coding is often a smaller part of the loop, but the bar for clarity and speed stays high.
Practice a mock Salesforce Senior Principal coding loopPractice Salesforce coding questions
Unify Customer ProfilesFree to read
Each record is [record_id, email, phone]. Two records belong to the same person if their normalized emails match (trimmed, lowercased, non-empty) or their normalized phones match (digits only, at least 7 digits, compare the last 10). Matches are transitive. Return the groups, each sorted, ordered by first id.
Input: records = [["r1","Ana@X.com","555-0100"],["r2"," ana@x.com","(415) 555-0199"],["r3","bo@y.com","+1 415 555 0199"]] Output: [["r1","r2","r3"]]
What a strong answer covers
- Normalization rules applied before matching
- Union-find with key-to-first-record maps
- Separate email and phone key spaces
- Deterministic sorted output
- Mentions hot-key over-merging as a real-world risk
2 more coding questions
- Fair-Share Async Job Dispatch Locked
- Range-Partition Orgs Across Pods Locked
Related pages
Salesforce coding at other levels
Other companies at this level
- Adobe Senior Principal 4 questions
- Amazon Senior Principal 6 questions
- Apple Senior Principal 7 questions
- Cisco Senior Principal 3 questions
- Google Senior Principal 14 questions
- IBM Senior Principal 3 questions