Open In App

Salesforce Interview Experience | On-Campus 2021

Coding Round:

The online test was on HackerRank. There were 3 questions.



  1. You have to prepare a pizza. There are some crusts and toppings given. The price of each crust and each topping is given. To make one pizza you can use exactly one crust and a topping can be used at most 3 times. A target price is given. You have to return a combination of crust and toppings whose total price is nearest to the target price. The total price could be more than the target price as well. But if there is a draw we had to return the pizza at a lower price.
  2. An array color [] was given where color [i] represented the color with which a pencil had to be colored. There was one paintbrush corresponding to every color and we had to wait b seconds before using the same brush again (time to refill is b secs). At every second you can either paint a pencil or wait for the paintbrush to get refilled. For a given b and color [] find the minimum time it takes to color all the pencils.
  3. An n*m grid of bulbs was given. Some were on (denoted by ‘O’) and some were off (denoted by ‘X’). When you toggle the state of a bulb, the state of the bulbs adjacent to it gets toggled too. Return the minimum number of toggles needed to switch all the bulbs off or -1 if it is not possible.

Students who were able to solve all 3 problems were shortlisted for interviews. 7 students were called for the interview.

Round 1: Interview 1



After an hour later, I got a call for 2nd interview.

Round 2: Interview 2

This was really different compared to any other interview I had given.

15 mins later, I got the call for the final interview.

Round 3: Interview Round 3

This interview was short and pretty chill. The interviewer introduced himself and asked me to introduce myself.

Results were declared the same day, 5 out of 7 had made it to the final round and 2 students, including me, were selected for the internship.

Preparation Tips:

Practice is a must to clear coding tests, as companies might shortlist only those who solve all the questions. I was into competitive programming and giving contests on codeforces and codechef regularly helped me a lot. Sort questions based on difficulty / based on topic and keep solving regularly. Read editorial if you are not able to solve a question after giving your best try. Read blogs to learn new stuff/algorithms. Solve questions from GFG/Leetcode to practice interview-specific questions.

Apart from this, explore new things like web development, app development, blockchain, machine learning. Learn one of these properly and build projects. I was lucky that my 2nd interviewer was interested in blockchain too, but this may not be the case all the time. Prepare core CS subjects like OOP, DBMS/OS well (I wasn’t asked anything on DBMS). Make sure you add only those things in your resume which you know thoroughly.

I was rejected by 5 companies before I got an offer from Salesforce. So don’t lose hope. Have faith in yourself, trust the process and keep working hard. You will eventually get what’s best for you.

Article Tags :