Salesforce logo

Salesforce Backend Engineer Coding Questions

31 practice questions for Salesforce Backend Engineer interviews

Salesforce backend engineer interviews typically focus on APIs, databases, system design, concurrency, caching, and data structures.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer

No verified questions yet for Salesforce.

coding Medium sliding window #1

1. [OA] Sliding Window — optimize query performance for Salesforce Marketing Cloud

Salesforce handles large volumes of marketing data and needs to analyze customer engagement over rolling time windows.
Given an array of integers representing daily engagement metrics, return the maximum sum of any k consecutive days.
Example method signatures:
- int maxEngagement(int[] engagement, int k) - returns the maximum sum of engagement metrics over any k consecutive days.
Example 1:
Input: engagement = [1, 2, 3, 4, 5], k = 3
Output: 12
Explanation: The maximum sum of any three consecutive days is 3 + 4 + 5 = 12.
Constraints:
- 1 <= |engagement| <= 10^5
- 1 <= k <= |engagement|.
coding Hard graph #2

2. [OA] Dijkstra's Algorithm — optimize routing for Salesforce Service Cloud operations

Salesforce needs to ensure efficient routing of customer service agents to the nearest issues, minimizing response time.
Given a graph represented by a Node class, identify the shortest path from a source to all other nodes using Dijkstra's algorithm.
Example method signatures:
- List<Node> shortestPath(Node source) - returns a list of shortest paths from the source node to all other nodes.
Example 1:
Input: source = Node A
Output: [Node B, Node C, Node D]
Explanation: The shortest path from A will include nodes B, C, and D based on edge weights.
Constraints:
- 1 <= |nodes| <= 1000
- Each node has a unique identifier.

Related Salesforce Backend Engineer interview prep

Start practicing Salesforce questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free