
Salesforce Interview Experience
Salesforce Interview Experience for Fresher AMTS, Apr 2026
AMTS
Fresher
Other
15 Months
Above 7 CPI (Salary Package: 45 LPA)
Electrical Engineering
2 Rounds
Application Experience
I applied for the opportunity at Salesforce through an off-campus hiring drive by submitting my application online via their careers portal. After applying, I received an invitation for the initial assessment round. Candidates who cleared the assessment were shortlisted for the interview rounds. The overall process consisted of multiple stages, including screening and technical interviews, and communication regarding each stage was shared via email. The entire process was smooth and professionally managed.
Preparation
Topics Prepared: Data Structures, Algorithms, Object-Oriented Programming (OOP), Database Management Systems (DBMS), Operating Systems (OS), System Design, Computer Networks, SQL
Preparation Tips
Tip 1: Practice DSA problems regularly and focus on strengthening core concepts like arrays, strings, trees, and dynamic programming. Tip 2: Revise core subjects such as DBMS, Operating Systems, and Computer Networks thoroughly for technical interviews. Tip 3: Prepare basic system design concepts and practice explaining solutions in a structured way during interviews.
Resume Tips
Tip 1: Keep your resume concise and clearly highlight relevant projects, internships, and technical skills. Tip 2: Only mention the technologies and concepts that you are confident about explaining in an interview.
Interview Rounds (2)
Detailed breakdown of each evaluation round, questions asked, and candidate approaches.
Round 1 — Online Coding Interview
Problems & Questions Asked (3)
Bellman Ford
You have been given a directed weighted graph of ‘N’ vertices labeled from 1 to 'N' and ‘M’ edges. Each edge connecting two nodes 'u' and 'v' has a weight 'w' denoting the distance between them. Your task is to calculate the shortest distance of all vertices from the source vertex 'src' . Note: If there is no path between 'src' and 'ith' vertex, the value at 'ith' index in the answer array will be 10^8. Example : 3 3 1 1 2 2 1 3 2 2 3 -1 In the above graph: The length of the shortest path between vertex 1 and vertex 1 is 1->1 and the cost is 0. The length of the shortest path between vertex 1 and vertex 2 is 1->2 and the cost is 2. The length of the shortest path between vertex 1 and vertex 3 is 1->2->3 and the cost is 1. Hence we return [0, 2, 1]. Note : It's guaranteed that the graph doesn't contain self-loops and multiple edges. Also, the graph does not contain negative weight cycles. Input Format : The first line contains three single space-separated integers ‘N’, ‘M’, and ‘src’ denoting the number of vertices, the number of edges in the directed graph, the source vertex, respectively. The following ‘M’ lines contain three single space-separated integers ‘u’, ‘v’, and ‘w’, denoting an edge from vertex ‘u’ to vertex ‘v’, having weight ‘w’. Output Format : Return an integer denoting the shortest path length from ‘src’ to ‘dest’. If no path is possible, return 10^9. Note : You do not need to print anything; it has already been taken care of. Just implement the given function.
Step 1: I first discussed the problem with the interviewer and clarified that the graph could contain negative edge weights, so algorithms like Dijkstra’s would not work correctly. Step 2: I decided to use the Bellman-Ford algorithm, which works for graphs with negative edge weights and can also detect negative cycles. Step 3: I initialized the distance of all nodes to infinity and set the distance of the source node to 0. Step 4: I relaxed all edges V−1 times (where V is the number of vertices). For every edge (u, v), if dist[u] + weight < dist[v], I updated dist[v]. Step 5: After performing V−1 relaxations, I ran one more iteration over all edges to check whether any distance could still be reduced. Step 6: If any distance was updated in this extra iteration, it meant that a negative-weight cycle existed in the graph. Step 7: Finally, I returned the shortest distances from the source node to all other nodes or reported the presence of a negative cycle.
Min Cost Path
You have been given a matrix of ‘N’ rows and ‘M’ columns filled up with integers. Find the minimum sum that can be obtained from a path which starts from the top left corner and ends with the bottom right corner. From any cell in a row, we can move to the right, down or the down-right diagonal cell. So from a particular cell (row, col), we can move to the following three cells: Down: (row+1,col) Right: (row, col+1) Down right diagonal: (row+1, col+1) Input Format: The first line contains a single integer ‘T’ representing the number of test cases. The first line of each test case will contain two integers ‘N’ and ‘M’ denoting the number of rows and columns, respectively. Next ‘N’ lines contain ‘M’ space-separated integers each denoting the elements in the matrix. Output Format: For each test case, print an integer which represents the minimum sum that can be obtained by travelling a path as described above. Output for every test case will be printed in a separate line. Note: You don’t need to print anything; It has already been taken care of. Constraints: 1 <= T <= 50 1 <= N, M <= 100 -10000 <= cost[i][j] <= 10000 Where ‘T’ is the number of test cases. Where 'N' is the number of rows in the given matrix, and 'M' is the number of columns in the given matrix. And, cost[i][j] denotes the value at (i,j) cell in the matrix. Time limit: 1 sec
Step 1: I first considered solving the problem using recursion by exploring all possible paths from the starting cell. Step 2: I realized that many subproblems were repeating, which would make the recursive solution inefficient. Step 3: I then applied Dynamic Programming using a DP table, where dp[i][j] represents the minimum cost to reach cell (i, j). Step 4: I initialized the first row and first column based on cumulative costs. Step 5: For each cell, I calculated the minimum cost using: dp[i][j] = cost[i][j] + min(dp[i-1][j], dp[i][j-1], dp[i-1][j-1]). Step 6: The value at dp[m-1][n-1] gives the final minimum path cost.
Longest Path In Directed Graph
You are given a Weighted Directed Acyclic Graph (DAG) consisting of ‘N’ nodes and ‘E’ directed edges. Nodes are numbered from 0 to ’N’-1. You are also given a source node ‘Src’ in it. Your task is to find the longest distances from ‘Src’ to all the nodes in the given graph. Return an array of ‘N’ integers where ‘ith’ integer gives the maximum distance of the node ‘i’ from the source node ‘Src’. A Directed Acyclic Graph (DAG) is a directed graph that contains no cycles. Note: Print -1 if a node is not reachable from the given source node. Example: Consider the following DAG consists of 5 nodes and 7 edges, Let the source node ‘Src’ be 0. Then the maximum distance of node 0 from the source node 0 is 0. (the distance of a node from itself is always 0). The maximum distance of node 1 from the source node 0 is 3. The path that gives this maximum distance is 0 -> 1. The maximum distance of node 2 from the source node 0 is 10. The path that gives this maximum distance is 0 -> 2. The maximum distance of node 3 from the source node 0 is 15. The path that gives this maximum distance is 0 -> 2 -> 3. The maximum distance of node 4 from the source node 0 is 54. The path that gives this maximum distance is 0 -> 1 -> 4. Thus we should print 0 3 10 15 54 Input format: The first line of input contains an integer ‘T’ denoting the number of test cases. then ‘T’ test cases follow. The first line of each test case consists of three space-separated integers ‘N’, ‘E’, and ‘Src’ representing the number of nodes, number of edges, and the given source node in the given DAG respectively. The next ‘E’ lines consist of three space-separated integers ‘U’, ‘V’, ‘W’ representing that there is a directed edge from node U to V having weight ‘W’. Output format : For each test case, print ‘N’ space-separated integers where ’ith’ integer gives the maximum distance of node ‘i’ from the source node ‘Src’. The output of each test case will be printed in a new line. Note: You do not need to print anything, it has already been taken care of. Just implement the given function. Constraints: 1 <= T <= 50 1 <= N <= 10^4 0 <= E <= 10^4 0 <= Src <= N-1 0 <= U, V <= N-1 1 <= W <= 10^5 Where ‘T’ is the total number of test cases, ‘N’, ‘E’, and ‘Src’ representing the number of nodes, number of edges, and the given source node in the given DAG respectively. ‘U’, ‘V’, ‘W’ represents that there is a directed edge from node U to V having weight ‘W’. Time limit: 1 sec
Step 1: I first clarified that the graph is a DAG, which allows the use of topological ordering. Step 2: I performed topological sorting of the graph using DFS or Kahn’s algorithm. Step 3: I initialized all distances to negative infinity and set the source distance to 0. Step 4: I processed the nodes in topological order and relaxed all outgoing edges. Step 5: For each edge (u, v) with weight w, I updated: dist[v] = max(dist[v], dist[u] + w). Step 6: After processing all nodes, the distance array contained the longest path from the source to all other nodes.
Round 2 — Face to Face
The round was conducted during the daytime in an online mode. The overall environment was professional and comfortable. The interviewer was friendly and gave me time to think through the problems. The discussion was interactive, and the interviewer encouraged me to explain my approach step by step. The focus was mainly on problem-solving and understanding my thought process while designing the solution.
Problems & Questions Asked (4)
Word Ladder
You are given two strings BEGIN and END and an array of strings DICT. Your task is to find the length of the shortest transformation sequence from BEGIN to END such that in every transformation you can change exactly one alphabet and the word formed after each transformation must exist in DICT. Note: 1. If there is no possible path to change BEGIN to END then just return -1. 2. All the words have the same length and contain only lowercase english alphabets. 3. The beginning word i.e. BEGIN will always be different from the end word i.e. END (BEGIN != END). Input format : The first line of input contains an integer ‘T’ denoting the number of test cases. The first line of each test case contains a string BEGIN. The second line of each test case contains a string END. The third line of each test case contains a single integer N denoting the length of the DICT i.e. the array of strings. The fourth line of each test case contains N space-separated strings denoting the strings present in the DICT array. Output format : For each test case, print a single integer representing the length of the shortest transformation sequence from BEGIN to END. The output of each test case will be printed in a separate line. Note: You don’t have to print anything; it has already been taken care of. Just implement the given function. Constraints: 1 <= T <= 5 1 <= N<= 10^2 1 <= |S| <= 10^2 Where ‘T’ is the total number of test cases, ‘N’ denotes the length of the DICT array and |S| represents the length of each string.
Step 1: I first clarified that the task is to find all the shortest transformation sequences between the begin word and the end word. Step 2: I converted the word list into a hash set so that lookups could be done in constant time. Step 3: I used Breadth-First Search (BFS) starting from the begin word because BFS guarantees the shortest path in an unweighted graph. Step 4: For each word, I generated all possible words by changing one character at a time and checked whether the new word existed in the dictionary. Step 5: I maintained a mapping of each word to its previous words to reconstruct the shortest paths later. Step 6: Once the end word was reached in BFS, I stopped expanding further levels and started reconstructing all paths using backtracking. Step 7: Finally, I returned all the shortest transformation sequences obtained from the backtracking process.
Number of Islands II
You have a 2D grid of ‘N’ rows and ‘M’ columns which are initially filled with water. You are given ‘Q’ queries each consisting of two integers ‘X’ and ‘Y’ and in each query operation, you have to turn the water at position (‘X’, ‘Y’) into a land. You are supposed to find the number of islands in the grid after each query. An island is a group of lands surrounded by water horizontally, vertically, or diagonally. Input Format: The first line contains an integer ‘T’ denoting the number of test cases. The first input line of each test case contains two single space-separated integers ‘N’ and ‘M’ representing the number of rows and columns of the grid, respectively. The second line of each test case contains an integer ‘Q’ representing the number of queries. Next ‘Q’ lines contain two single space-separated integers ‘X’ and ‘Y’, representing the coordinates of the grid i.e the coordinates of the point to be turned into land. Output Format: For each test case, print a single integer denoting the number of islands after each query operation. Print the output of each test case in a separate line. Note: You are not required to print the expected output; it has already been taken care of. Just implement the given function. Constraints: 1 <= T <= 5 1 <= N <= 1000 1 <= M <= 1000 1 <= Q <= 100000 0 <= X < N 0 <= Y < M Time limit: 1 sec
Step 1: I first understood that land is added dynamically, and after each addition, we must calculate the number of islands. Step 2: I used the Union-Find (Disjoint Set) data structure to efficiently manage connected components. Step 3: Initially, the grid contained only water, and the island count was zero. Step 4: Whenever a new land position was added, I treated it as a new island and increased the island count. Step 5: I checked its four neighboring cells (up, down, left, right). Step 6: If any neighbor was already land, I performed a union operation to merge the islands and reduced the island count. Step 7: After processing the neighbors, I recorded the current island count. Step 8: Finally, I returned the list containing the island count after each land addition.
Feed System
Design a social media feed system (like Twitter). Design a scalable system where users can post tweets, follow other users, and view a personalized news feed containing tweets from people they follow. The system should support millions of active users, handle high read/write traffic, and provide fast feed updates. Key Requirements: Users should be able to post tweets. Users can follow or unfollow other users. Each user should see a news feed with recent tweets from the users they follow. The system should support high scalability and low latency. Ensure efficient storage and retrieval of tweets.
Tip 1: Start by identifying functional and non-functional requirements such as scalability, latency, and availability. Tip 2: Design a high-level architecture including components like load balancers, API servers, databases, caching systems, and message queues. Tip 3: Discuss optimizations like feed generation strategies (fan-out on write vs. fan-out on read), caching, database sharding, and CDN usage to handle large-scale traffic.
Selection Perspective
I was able to clear the initial stages of the process at Salesforce, but I was rejected in the later stage because the interview focused heavily on system design concepts. My preparation at that time was more focused on DSA and core subjects, so I realized that I needed a deeper understanding and more practice in system design to perform better in such interviews.
Key Preparation Tips
Prepare DSA thoroughly.
Practice aptitude and puzzle-based questions.
Have at least two good projects on your resume.
Be prepared to explain your projects clearly.
Practice coding problems involving Arrays, Binary Search, DP and Recursion.
Prepare common HR questions such as Tell me about yourself and Who is your role model?
More Interview Experiences

Amazon
SDE - Intern
Amazon Interview Experience for Fresher SDE - Intern — Oct 2025

Hotstar
SDE – Intern
Disney+ Hotstar SDE Intern Interview Experience
