Salesforce Principal coding interview questions
These are the 3 coding questions YourAlly has tagged for Salesforce at Principal. Principal is the common India title for this level. YourAlly treats it as Staff (E6), the same level as Google L6, Meta E6 and Amazon L7.
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 interviewers also expect clean code quickly and edge cases you raise before they do.
Practice a mock Salesforce 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
More Salesforce Principal rounds
- Behavioral 3 questions
Salesforce coding at other levels
- SDE-3 6 questions
- Senior Principal 3 questions
Other companies at this level
- Adobe Principal 4 questions
- Amazon Principal 6 questions
- Apple Principal 7 questions
- Cisco Principal 3 questions
- Google Principal 14 questions
- IBM Principal 3 questions