# Salesforce Interview Experience for Internship -2021 (On-Campus)

• Difficulty Level : Hard
• Last Updated : 21 Feb, 2022

Round-1(75 min):

• Question on Binary Search(minimizing the window length in a string type, similar questions available on practice. gfg).
• Given an array of length N holding sizes of (S, M, L, XL) return the maximum number of beads that can be placed in 2 containers with the following conditions :

Each container can have more than one bead of the same size. Start with a bead of any size. once you have started you can’t skip the bead in the sequence. Stop when u have to pick a bead of the third size.

I solved these in 30-35 min which gave me some edge in the next rounds as they didn’t ask me to write down the code.

Round-2(55 min): This round started with my brief introduction for about 3-4 min. Then he asked me about the language I am comfortable in. I told him C and C++ for coding and designing, js for web designing, and python for data science. So we continued with C++. Then he came up with 2 coding questions.

Given a string of type “string1/string2/string3/string4…..”

I have to cut out the “string3” from it.

I gave an approach like- first we need to reach the 2nd “/” and then start appending the characters in the answer string until we encounter the 3rd “/”. He then told me to write the code for it. I did that, but there was a bug in it for which he gave me time to resolve which I did soon.

Find out the 2nd maximum element from an array of numbers.

I gave an approach of maintaining 2 variables maximum and 2nd maximum while iterating through the array.

He then told me to generalize it for Kth maximum element. I explained to him my approach in many methods like using the n*log(n) sorting method, quick select method of quicksort, counting sort if the data is static and finally the median method with array partition which has the worst case of linear time. He was quite happy as I had so many methods for this. He then asked me to compare the time and space complexities of these algorithms.

Then he asked some questions on OOPS.

1. What would have been the scenario if OOPS was not introduced?
3. Explain the usage of overriding with real-life examples.

Then he asked me if I knew something in DBMS as it was not in my curriculum till then. I told to ask as I had studied a bit on my own. Some of the questions he asked were –

1. What is RDBMS?
2. How data is stored in non-RDBMS and its example?
3. What is indexing in DBMS?
4. Finally, he gave me a chance to ask questions if I had any. Then I asked :
5. What will interns do in those 2 months?
6. Will there be options for project choice?
7. His answers were quite genuine.

Round-3(50 min): This round started with my hobbies and interests. Then he asked me some questions about FIFA and PUBG as I had these mentioned as interests in my resume. He had received my reviews of the previous round so he began with some coding questions :

I explained my approach with an example like-

Given 1->2->3->4->5

If we have processed till 3 then we will have 3->2->1 and 4->5.

After it, we can transfer 4 from the right linked list as head of our left one and continue.

He was satisfied with my explanation and didn’t ask to write any pseudo code also.

2. Print 1-20 natural numbers by recursively calling the main function.

I gave him two approaches –

Pass two command-line arguments as 1 and 20 and recursively call the main function further with incremented index and 20.

Set two global variables one as 1 and the other as 20 and keep on incrementing 1st variable every time we call main. He told me to think of another approach with a static variable Then I explained with the use of a static variable in the main function and another variable as global set to 20.

Then he asked to design a class-based system for ATM Machines.

I gave him a constructive approach like- Let’s first consider it as a black box that takes the ATM card, pin, and amount as input and after some verifications gives us the money if valid.

Then I told him the most simple mechanism it can have for giving out cash in a sequential way- (ATM no. + Pin)->(verification of pin from bank server) ->(if correct then takes amount input)->(verification for available BAL with REQ amount)->(if good then gives out money).

At each step, there will be some side cases like while verification of pin there may be bank server error or incorrect pin then we will need to handle them also.

Finally, I counted some class names and some security things we need to take care of. He was quite impressed with my approach and didn’t ask me to write and class or code further.

Then he asked me some questions on OS :

1. What are paging and round-robin?
3. As it was not in my curriculum till then so he didn’t go deeper.
4. Then he asked me some questions on Networking-
5. What is the role of the presentation layer?
6. What are the protocols used in that layer?
7. What is SSL protocol?

As it was not in my curriculum till then so he didn’t go deeper.

Finally, he gave me a chance to ask questions if I had any. Then I asked :

1. Give me some feedback about how I performed and my weaknesses.
2. Will I work in salesforce or future force?

HR Round(20 min): He asked me to introduce myself and then he asked me about my data science project on HAR:

1. Which algorithms are used in that project?
2. Difference between Decision Tree and Neural Network?
3. Why Decision Trees are not used much as compared to NN in the case of classification.

Then he asked me some genuine questions :

1. Why Salesforce?
2. What will I do if there is a team conflict in the given scenario:
3. I think my idea is better than what my team is currently discussing but they are not giving me a chance to put my idea?
5. Will I get a chance to change my project?
6. Difference between SDE, IT Analyst, and Business Analyst.

Fortunately, I was selected among the 3 students for an internship!

Tips:

• Be good in DSA (this may give you an edge).
• Understand the concepts/technologies you encounter.
• Practice design implementation.
• Stay calm and have confidence.
• Discuss everything you think during the interview.
My Personal Notes arrow_drop_up