Salesforce India || AMTS (2022 Graduate) || Online Assessment || Off Campus
Anonymous User
4675

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

Comments (4)