Skip to content
Related Articles

Related Articles

Improve Article
Salesforce Interview Experience | On-Campus for Internship 2020
  • Last Updated : 24 Oct, 2019

Salesforce is one of the best companies where you can intern and spend your summer. It’s worth joining salesforce for an internship. They have many benefits for the employees such as:
1) Wellness benefits, Eye and Dental care.
2) Wellness Reimbursement Vision/Dental Reimbursement, Free food, Snacks, and the Coffee shop.
3) Flexible Hours and Work From Home Policy is best.
4) Lodging Facility(Accommodation) is one of the best.
Salesforce benefits are amazing, they take care of employees really well. Salesforce benefits are perhaps the best in the country today.
Let’s Jump to my interview experience.

Online Coding Round:

The online test for Salesforce wasn’t too hard, there were 3 questions-

Q1) Given an array of integers, and a number ‘sum’, find the number of pairs of integers in the array whose sum is equal to ‘sum’.

You can follow this link for the solution.
Q2) Given a String s, find the number of substrings when converted to integer gives you a prime number. Also given that all prime numbers generated should be less than 10^6.
constraint- len(s)<=10^8

answer=[2, 3, 23] return len(anser) //=3 in this case

It is standard dynamic programming question. Can be solved in O(n*6), where n=length of string by genrating all the prime number upto 10^6 using sieve of eratosthenes.

Q3) Given a string S and a pattern k, you need to find the shortest length subsequence of S which contains all the character of pattern. And also the string is cyclic in which you can come back to the starting position when you have reached the end in cycling order.

1) s=abgeasd k=eag
return gea
2) s=jainummsm k=jam
return mja

As you can use the string in the cyclic order so out of jainum and mja, mja is the valid answer with minimum length.

You just need to find the pattern k in s+s(write s two times as repetition allowed for cyclic case). O(n) solution required using sliding windows algorithm.


Almost all the students solved 1st question. But you need to solve 2 questions for getting selected for the next rounds.

Around 15 people were shortlisted on the basis of coding round and time took to solve the test (Given 75 minutes to solve all the questions). I solved all the questions within 40 minutes and got shortlisted for personal interviews.

Round 1:

This round was fairly simple.

The interviewer asked me to introduce myself, my research interests and what are my hobbies. Then he asked me some questions related to my research work and research interest. Then he gave me a simple coding question.

The question was to find one city among the given cities and stations such that the distance between the city and the nearest station to that city is farthest. I told him the approach and wrote a simple for loop, O(n) solution, he was quite impressed by my speed. He asked me to check if this code would miss some corner case I was quite confident and told him no this code should work.

Eg-city=[1, 4, 6, 8] and stations=[1, 4, 5] Given points on positive x-axis,
The answer should be city 8 as the nearest station to city 8 is station 5 which is 3 units away.

Then he asked me what do you know about OOP I told him about methods polymorphism, inheritance, abstraction etc.

We had to wait for the results and around 9 students got shortlisted for the next round.

Round 2:

The interviewer asked about me and where I was from and she then asked me my interests and what are my hobbies. Then she asked me some questions related to my research interest. Then she asked me one question based on sql query, 4 to 5 questions on oop and at last 2 puzzles which were quite simple.
The first Question was to search for the number of employees, given two tables with emp_id as the primary key whose address is x and the city he lives is y. Given address and city in different tables.

Then she asked me some basic questions related to OOP, such as friend function, private & protected keyword, and to implement multi-level polymorphism, encapsulation and data inheritance in one example simultaneously.
She then asked me a puzzle, given a cake you need to cut the cake in 8 parts, 3 cuts to cut the round cake into 8 equal pieces

Answer is quite simple, imagine a square cake on origin with length one, cut at x=0.5, y=0.5 and z=0.5, Will result into 8 equal parts.
1. Cut the cake in quarters (4 pieces) using 2 of the cuts – one horizontally down the center of the cake and the other vertically down the center of the cake.

2. This will leave you with 4 pieces (or slices) of cake. Then, you can take all 4 pieces and arrange them in a stack that is 4 pieces high.

3. Finally, you can just cut that stack of 4 pieces in half – using your third and final cut – and then you will end up with 8 pieces of cake!

She then asked me another puzzle, given the number of employees n in a firm and expansion rate r, you need to find number of employees at the end of t years.

It’s a straightforward question, same as compound interest, where n’=n*(1+r/100)^t.

I came out and was asked to go for the next round, where 6 students got selected for the next round.

Round 3:
This round was taken by a Senior Manager.

He asked me to tell him about myself. He was writing down all the technologies that I used and that I was interested in and asked questions from each of them.
He asked me about Bootstrap, HTTP request, and response, types of software testing.
Then he asked my research interests. I told him data mining and then he asked me some questions related to my research work, research interest and my past projects.
After this, he asked about any social activities that I had done in the past, I told him that I’m in the social club of our institute, AVANA where we actively hosted many events such as blood donation camps, cloth donation camps, old age home visit, etc. He was quite impressed by my cultural activities. The HR round went well.

Out of 8 people, 6 people went up till the HR round. They declared the result and they selected 4 peoples among them and I was one of them:)

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :