Salesforce Interview Experience | On-Campus 2021
The online test was on HackerRank. There were 3 questions.
- 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.
- 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.
- 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
- The interviewer asked me to introduce myself. He then asked me to briefly explain the projects I had mentioned in my resume. I had mentioned 6 projects in my resume. One was based on blockchain, others were related to web development. I explained to him all my projects. He asked questions in between related to my projects, like what problem statement does my project solve, why did I use a particular tech stack, what challenges I faced in building it. This took around 20 mins. He was satisfied with my description of the projects. Make sure you are thorough with whatever you mention in your resume. You can be questioned on anything in your resume.
- After this, he asked me general questions based on DSA. He asked to mention various data structures and tell what is the time complexity for each operation. He gave few scenarios and asked which data structure would I use and why. After this, he asked a question related to OS. I told him it hasn’t been taught yet, he told me fine and we moved to HackerRank code-pair.
- He asked me to implement a queue using stack, I immediately coded up the solution and explained the logic. He ran few test cases and all of them passed. He was satisfied.
- After this, he asked me why did I want to join Salesforce, what does Salesforce do and what are the core values of Salesforce. I answered all the questions and he was satisfied with it. He then asked me if I had any questions for him? I asked him what projects I’ll be working on if I get an offer, then I asked him if I should learn anything in the coming year which will help me in the internship. He answered both the questions and ended the interview.
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.
- As I had mentioned that one of my projects was based on Blockchain, I had built a Blockchain-Based Voting System for Elections. The interviewer was a blockchain enthusiast too. He asked me to explain everything I knew about blockchain. I started from scratch, I told him why we need a decentralized system in the first place and how we couldn’t rely on central authorities like banks. I explained it to him in layman’s language giving a real-life example of a public distributed ledger. I explained to him how data is stored in form of interlinked blocks (singly linked-list) and why blockchain is secure, immutable, transparent and anonymous. I explained the math behind it, how cryptography is used to encrypt the transactions using the private key and public key, how miners mine cryptocurrency by solving a cryptographic puzzle (finding the nonce using brute-force) using their computational power, how the proof of work (PoW) consensus works, how it’s practically impossible to hack a public blockchain, I told him about the 51% attack. Then I told him how we can make smart contracts using solidity and deploy them on the ethereum blockchain. He was really impressed by my explanation. He asked me how I learnt all this. He was happy to know that I explore things outside the curriculum and try to learn new things on my own. We had a great conversation and it hardly felt like I was in an interview. We finally came to the conclusion that blockchain has a real potential to make the internet really democratic. This was for 35–40 mins.
- After this, he asked me questions based on OOP. He asked me to explain what is inheritance and polymorphism, why we use them, their different types. He asked me what is an abstract class, when would you use an abstract class and when would you use an interface. What is a virtual function? I answered all the questions.
- He then asked me if I knew about design patterns, I told him it hasn’t been taught yet and told him I will learn it in the coming semester. He told no problem and we moved on to HackerRank code-pair. He asked me to write the code to print all the subsets (subsequences) of a string. I used simple recursion (pick/don’t pick) and coded up the answer. He tested it on few test cases and they passed. He was really happy with my performance and told me that he is looking forward to work with me.
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.
- He asked me to explain the projects I had mentioned in my resume. He was a blockchain enthusiast too and had a good understanding of how it works, he cross-questioned me about various fundamentals related to blockchain and cryptography and I answered them all.
- My second project was a real-time chat application using react and web sockets (socket.io). I explained to him how WebSockets work and provide a bi-directional channel for communication between server and client. He asked a few follow up questions like, what is the difference between angular and react, why did I use socket.io and what are the other WebSockets available. I answered them all.
- Other projects were: a simple version of google-maps using Dijkstra’s algorithm, clone of splitwise app, clone of snake game and a file compressor using Huffman coding. He was really happy that in 2 years I had explored so much, he was also impressed with my google kickstart rank.
- He then asked me about my hobbies, clubs/departments I was a part of in college and asked me who is my motivation.
- In the end, he asked me if I had any questions for him. I told him our college uses superset (CRM app) to manage campus recruitments, can it be done using Salesforce. He was really impressed with the question and explained to me how we can use salesforce. Then the round was over.
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.
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.
Hey geek! It’s time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!
Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!