Salesforce interview experience Real time questions & tips from candidates to crack your interview

Member of Technical Staff

Salesforce
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Data Structures, Algorithms, Operating Systems, OOPS, Web Development
Tip
Tip

Tip 1 : Solve questions in each topic and make sure to note down important concepts for quick review
Tip 2 : Practice specifically for interviews too by solving questions asked previously in top firms 
Tip 3 : Pay utmost importance to your projects

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Put links for your projects on resume
Tip 2 : Strictly one page, with only relevant points

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date24 Mar 2020
Coding problem2

Online coding assessment having 20 MCQs and 2 coding questions

1. Spiral Matrix

Easy
0/40
Asked in companies
GE (General Electric)AmazonSalesforce

You are given a N x M matrix of integers, return the spiral path of the matrix

Example Of Spiral Path

Spiral Path

Try solving now

2. Longest Happy String

Moderate
25m average time
75% success
0/80
Asked in companies
WalmartSalesforceZoho Corporation

Ninja likes to play with strings, and he calls a string ‘S’ Happy if it only contains letters ‘a’, ‘b’, and ‘c’, and no three consecutive letters in the string are the same. For example, ‘aa’, ‘aab’, ‘aabbcc’ are the happy strings, but ‘aaa’, ‘aaza’, ‘aaabbb’ are not happy strings.

You are given three non-negative integers ‘X’, ‘Y’, ‘Z’. You need to find the longest happy string such that it contains ‘a’ at most ‘X’ times, ‘b’ at most ‘Y’ times, and ‘c’ almost ‘Z’ times.

Note:

There can be more than one possible string with maximum size. In that case, you can return any of them.
Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date27 Mar 2020
Coding problem2

The first interview round was fairly easy, and the interviewer was very helpful. It was an hour long interview.

1. Buy and Sell Stock

Hard
0/120
Asked in companies
AtlassianAmerican ExpressCultfit

You are Harshad Mehta’s friend. He told you the price of a particular stock for the next ‘n’ days.


You are given an array ‘prices’ which such that ‘prices[i]’ denotes the price of the stock on the ith day.


You don't want to do more than 2 transactions. Find the maximum profit that you can earn from these transactions.


Note

1. Buying a stock and then selling it is called one transaction.

2. You are not allowed to do multiple transactions at the same time. This means you have to sell the stock before buying it again. 
Example:
Input: ‘n’ = 7, ‘prices’ = [3, 3, 5, 0, 3, 1, 4].

Output: 6

Explanation: 
The maximum profit can be earned by:
Transaction 1: Buying the stock on day 4 (price 0) and then selling it on day 5 (price 3). 
Transaction 2: Buying the stock on day 6 (price 1) and then selling it on day 6 (price 4).
Total profit earned will be (3 - 0) + ( 4 - 1) = 6. 
Try solving now

2. Cycle Detection in a Singly Linked List

Moderate
15m average time
80% success
0/80
Asked in companies
InformaticaTech MahindraCIS - Cyber Infrastructure

You are given a Singly Linked List of integers. Return true if it has a cycle, else return false.


A cycle occurs when a node's next points back to a previous node in the list.


Example:
In the given linked list, there is a cycle, hence we return true.

Sample Example 1

Try solving now
03
Round
Medium
Video Call
Duration90 minutes
Interview date30 Mar 2020
Coding problem2

It was a long interview, although the interviewer was again very friendly. The main focus was on problem solving in this round too.

1. Minimum swaps to sort Array

Easy
10m average time
90% success
0/40
Asked in companies
GoogleAmazonSalesforce

Given an array 'arr' of size 'N', find the minimum number of swaps required to be made between any two elements to sort the array in ascending order. The array does not contain duplicates i.e all the elements of the array are distinct.

Example :

Let the given array be [1,5,4,3,2]  we swap index 1 with 4 i.e. 5 -> 2 and 2 with 3 i.e. 4 -> 3 to form the sorted array {1, 2, 3, 4, 5}.
Try solving now

2. Optimal Strategy for a Game

Easy
15m average time
85% success
0/40
Asked in companies
GoogleIBMJP Morgan

You and your friend Ninjax are playing a game of coins. Ninjax place the 'N' number of coins in a straight line.

The rule of the game is as follows:

1. Each coin has a value associated with it.

2. It’s a two-player game played against an opponent with alternating turns. 

3. At each turn, the player picks either the first or the last coin from the line and permanently removes it.

4. The value associated with the coin picked by the player adds up to the total amount the player wins. 

Ninjax is a good friend of yours and asks you to start first.

Your task is to find the maximum amount you can definitely win at the end of this game.

Note:

'N' is always even number.

Ninjax is as smart as you, so he will play so as to maximize the amount he wins.
Example 1:
Let the values associated with four coins be: [9, 5, 21, 7] 

Let’s say that initially, you pick 9 and Ninjax picks 7.
Then, you pick 21 and Ninjax picks 5. 
So, you win a total amount of (9+21), i.e. 30.

In case you would have picked up 7 initially and Ninjax would have picked 21 (as he plays optimally). 
Then, you would pick 9 and Ninjax would choose 5. So, you win a total amount of (7+9), i.e. 16, which is not the maximum you can obtain.

Thus, the maximum amount you can win is 30.
Example 2:
Let the values associated with four coins be: [20, 50, 5, 10] 

Let’s say that initially, you pick 10 and Ninjax picks 20.
Then, you pick 50 and Ninjax picks 5. 
So, you win a total amount of (10+50), i.e. 60.

In case you would have picked up 20 initially and Ninjax would have picked 50 (as he plays optimally). 
Then, you would pick 10 and Ninjax would choose 5. So, you win a total amount of (20+10), i.e. 30, which is not the maximum you can obtain.

Thus, the maximum amount you can win is 60.
Try solving now
04
Round
Easy
Video Call
Duration60 minutes
Interview date1 Apr 2020
Coding problem0

It was a technical cum HR round which was take by a Director of Software Engineering team based in Salesforce SF. The initial questions were based on basics of C++/Python and some OOPS questions. Then they grilled a lot based on the resume and specially the projects mentioned on it. Some hr questions like challenges faced in life and how you solved them, how do you see yourself in the next 5 years and how do you think Salesforce aligns with it, etc.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which keyword is used for inheritance?

Choose another skill to practice
Similar interview experiences
company logo
Member of Technical Staff
4 rounds | 9 problems
Interviewed by Salesforce
1356 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by Salesforce
3046 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Salesforce
965 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
2164 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Member of Technical Staff
4 rounds | 13 problems
Interviewed by Oracle
5011 views
0 comments
0 upvotes
company logo
Member of Technical Staff
3 rounds | 10 problems
Interviewed by Adobe
893 views
0 comments
0 upvotes
company logo
Member of Technical Staff
2 rounds | 5 problems
Interviewed by Oracle
1382 views
0 comments
0 upvotes