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

SDE - 1

Salesforce
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I was not exceptionally good at coding at the start then I solved more than 400+ questions on code studio. Now I can crack most of the interviews I give.
Application story
This company visited our campus for hiring their only i applied for the same it has many round starting with online assessment at the starting.
Why selected/rejected for the role?
i was rejected because i do not able to give a concise and good solution for the question being asked to me .
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Mention some good projects on resume
Tip 2 : Be confident
Tip 3 : Good with computer science basics and ds and algo

Application process
Where: Campus
Resume Tip
Resume tip

Tip 1 : Good Projects
Tip 2 : Having some achievements is plus point

Interview rounds

01
Round
Medium
Face to Face
Duration60 minutes
Interview date25 Nov 2022
Coding problem2

1. Counting Pairs

Moderate
35m average time
65% success
0/80
Asked in companies
GrowwAdobeThought Works

You are given a positive integer N and an equation 1/X + 1/Y = 1/N

You need to determine the count of all possible positive integral solutions (X, Y) for the above equation.

Note:

1. X and Y should be greater than 0.
2. (X, Y) and (Y, X) are considered different solutions if X is not equal to Y, i.e. (X, Y) and (Y, X) will not be distinct if X=Y.
Problem approach

You are given a positive integer N and an equation 1/X + 1/Y = 1/N
You need to determine the count of all possible positive integral solutions (X, Y) for the above equation.

Try solving now

2. Level Order Traversal

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

You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.

For example:
For the given binary tree

Example

The level order traversal will be {1,2,3,4,5,6,7}.
Problem approach

You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date25 Nov 2022
Coding problem2

1. Score After Flipping Matrix

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

You are given a 2 - D matrix, ‘MAT’, which consists of only 0s and 1s. Every row of the matrix is interpreted as a binary number, and the sum of all these “binary number interpreted rows” is defined as the score of the matrix, ‘MAT’.

You have to maximize the score by making any number of passes where a pass consists of choosing any row or column, and toggling each value in that row or column, i.e., changing all 0s to 1s, and all 1s to 0s. Your task is to return the highest possible score of the matrix, ‘MAT’.

Problem approach

You are given a 2 - D matrix, ‘MAT’, which consists of only 0s and 1s. Every row of the matrix is interpreted as a binary number, and the sum of all these “binary number interpreted rows” is defined as the score of the matrix, ‘MAT’.
You have to maximize the score by making any number of passes where a pass consists of choosing any row or column, and toggling each value in that row or column, i.e., changing all 0s to 1s, and all 1s to 0s. Your task is to return the highest possible score of the matrix, ‘MAT’

Try solving now

2. Puzzle

There are 2 trees in a garden (tree "A" and "B") and on both trees are some birds.
The birds of tree A say to the birds of tree B that if one of you comes to our tree, then our population will be the double of yours.
Then the birds of tree B tell to the birds of tree A that if one of you comes here, then our population will be equal to that of yours. How many birds in each tree?

03
Round
Medium
Face to Face
Duration60 minutes
Interview date25 Nov 2022
Coding problem2

1. Group Anagrams Together

Moderate
0/80
Asked in companies
PayPalArcesiumDunzo

You have been given an array/list of strings 'STR_LIST'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one another.

Note :
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase. We can generalize this in string processing by saying that an anagram of a string is another string with the same quantity of each character in it, in any order.
Example:
{ “abc”, “ged”, “dge”, “bac” } 
In the above example the array should be divided into 2 groups. The first group consists of { “abc”, “bac” } and the second group consists of { “ged”, “dge” }.
Problem approach

You have been given an array/list of strings 'STR_LIST'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one another.

Try solving now

2. Flatten Binary Tree

Moderate
25m average time
70% success
0/80
Asked in companies
DunzoQuikrMakeMyTrip

You are given a binary tree consisting of 'n' nodes.


Convert the given binary tree into a linked list where the linked list nodes follow the same order as the pre-order traversal of the given binary tree.


Use the right pointer of the binary tree as the “next” pointer for the linked list and set the left pointer to NULL.


Use these nodes only. Do not create extra nodes.


Example :
Input: Let the binary be as shown in the figure:

Example Tree

Output: Linked List: 15 -> 40 -> 62 -> 10 -> 20 -> NULL

Explanation: As shown in the figure, the right child of every node points to the next node, while the left node points to null.

Also, the nodes are in the same order as the pre-order traversal of the binary tree.
Problem approach

You are given a binary tree consisting of integer values. Your task is to convert the given binary tree into a linked list where the nodes of the linked list follow the same order as the pre-order traversal of the given binary tree.

Try solving now

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by Salesforce
3289 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Salesforce
1505 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Salesforce
1120 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes