Salesforce India || AMTS (2022 Graduate) || Online Assessment || Off Campus
Question Details
Salesforce India conducted it\'s off campus hiring drive on April 7th, 2022 on Hackerrank for the role of Associate Member of Technical Staff (AMTS). I was fortunate enough to receive...
Full Details
Salesforce India conducted it\'s off campus hiring drive on April 7th, 2022 on Hackerrank for the role of Associate Member of Technical Staff (AMTS). I was fortunate enough to receive the link for the online assessment. Here are the questions:
1. Bob is given two integers f and s. He has to find the minimum positive integer that is divisible by f and has sum of digits equal to s. Help Bob in finding that number. If such a number does not exist,
return -1.
I/P: f = 13, s = 50 => O/P: 699998
I/P: f = 15, s = 50 => O/P: -1
Constraints: 1 <= f <= 495, 1 <= s <= 5000
Note: Since the number can be very large,
return that number as a string.
2. Given an array of integers arr and another integer K, find the size of the largest subset in the array such that the difference between any two elements in that subset is less than or equal to K.
I/P: arr = {12,32,43,12,15,8}, K = 30 => O/P: 5
Constraints: 1 < arr.size() < 1000, 1 <= arr[i] <= 10^9, 1 <= K <= 10^12
Note: The size of the largest subsequence has to be atleast 2.
3. Given an array of positive integers, find the sum of the highest and second highest recurring element of that array. An element is said to be recurring if and only if it apperas two or more times in that array. If two or more elements have the same frequency, then the highest element has to be considered.
I/P: arr = {4,2,4,5,2,3,1,2} => O/P: 6
Constraints: 1 < arr.size() < 10^5, 1 <= arr[i] <= 10^9
Note: If there are no recurring elements in the array,
return -1. If there is only recurring element in the array,
return that element. If there are two or more recurring elements,
return the sum as described above.
I was able to solve 2nd and 3rd question completely within 10 minutes and then struggled for the reamining 70 minutes for the 1st question. Unfortunately my brute force solution for 1st question
passed only 2 test cases.
Yesterday I got an (informal) rejection mail from the recruiter. All of my friends who copied the solution for 1st question from internet got selected for interview. Recruiter mentioned that she will do plagiarism check in the information session before the online assessment but my friends who got selected for interview didn\'t even change the variable names. So my advice to all future aspirants is to cheat if you want to get shortlisted.
Edit-1: Here is the link for question-1: https://codeforces.com/problemset/problem/1070/A
Here is the link of the solution: https://www.itread01.com/content/1545604399.html
About This Question
This is a reported interview question from a salesforce interview for a swe role (new grad level) during the oa round reported in 2022.
More Salesforce Interview Questions
About Salesforce Interview Reports
This question was reported by a candidate who interviewed at Salesforce. LeakCode aggregates interview reports from 10+ sources, including 1Point3Acres, Glassdoor, LeetCode Discuss, Blind, Reddit, Indeed, and Nowcoder. Each report is translated where necessary, deduplicated against existing entries, and tagged by company, role, round type, and reporting date.
Use this question as one calibration data point, not a memorization target. Companies typically rotate their question pools every 2-4 months; the exact wording of a 2024 question may differ from what you encounter today. The underlying pattern, difficulty level, and follow-up depth at Salesforce are the higher-signal extractions to take from this report.
For broader preparation context, the Salesforce interview process typically includes a recruiter screen, one or two technical phone screens, and a 4-5 round on-site loop covering coding, system design (at L4+ levels), and behavioral. Reports tagged on LeakCode show the round-by-round distribution and typical difficulty calibration. To browse questions filtered by round type and seniority, use the company hub linked above.
How To Practice This Type of Question
Solve similar problems on LeetCode under timed conditions (25-35 minutes per medium difficulty). The goal is pattern recognition: recognize the underlying technique (sliding window, two-pointer, BFS, memoized recursion, etc.) within 60-90 seconds of reading. Strong candidates verbalize their hypothesis out loud before coding, then iterate based on feedback. Weak candidates dive into implementation immediately, lose time on the wrong approach, and run out of time for follow-ups.
Companies update their question pools every 2-4 months. The exact wording of any given question may have been retired by the time you interview. Focus your prep on the pattern, not the specific problem. The patterns that appear in Salesforce reports consistently are the ones worth investing in; one-off niche problems are not.
During Your Salesforce Round
Apply the standard interview round template: clarify requirements (2-3 minutes), state your approach out loud and confirm direction with the interviewer (3-5 minutes), code with narration (15-25 minutes), test with concrete examples including edge cases (5 minutes), discuss optimization or trade-offs if time permits (5 minutes). This template is universally accepted across FAANG and adjacent companies; deviating from it produces weaker interviewer feedback signal.
The single most predictive failure mode in Salesforce reports tagged "no hire": not asking clarifying questions. Interviewers are explicitly trained to weight this. Strong candidates ask 3-5 clarifying questions even on problems that look obvious; weak candidates dive into code immediately. The clarifying-question check is often the first signal recorded in the interviewer's written notes.