Salesforce LMTS OA [Hyderabad]

Location
Hyderabad
Posted
13 May 2026
60 reads

Summary

I took a Salesforce LMTS online assessment in Hyderabad, solved one of the two questions but failed on the second due to a timeout, and did not clear the round.

How it went

Recently gave salesforce LMTS OA on HackerRank. It's a 75‑mins test, need to solve 2 questions

Q1: generate binray strings

Given an array of integers return list consist of 2 binray strings based on below conditions

  1. if the integer at current index exists after the index anywhere in the array give 1 to the current index else 0 (seen after)
  2. if the integer at current index exists before the index anywhere in the array give 1 to the current index else 0 (seen before)

Eg: Arr = [1,2,3,1,2,4,5]

output: {[1100000], [0001100]}

Q2: read logs to update number of pods (bit lengthy question to read andunderstand)

We have n microservices with number of pods active for each service given in integer array. Given m logs as List<List> where each will have 3 entries

log structure - [timestamp, podIndex, newValue for number of pod instances]

based on we logs can perform below 2 operations:

  1. [1,2,5] - number instances of pod number 2 should be update to 5
  2. [2,-1,8] - all pods whose instances value is less than 8 should be updated to 8

Eg: n= 4 pods = [1,2,3,4] m= 3 logs = {[1,-1,3], [2,2,20], [1,-1,1]}

output: pods = [3,20,3,4]

(my observations: timestamp given in logs is irrelavant to solve this and pod number in logs is index 1 based)

finished Q1 with all tests passed, Q2 failed few tests due to timeout issue. implemented a optimized solution for Q2 using priority queue but couldn't submit as test timed out before running the code. I couldn't clear the round, hope it helps someone else

Questions asked (2)

  1. 01

    Generate Binary Strings Based on Array Occurrences

    Data Structures & Algorithms

    Given an array of integers, return a list consisting of two binary strings. For each index:

    1. If the integer at the current index appears anywhere after this index in the array, set the corresponding bit in the first string to 1, otherwise 0 ("seen after").
    2. If the integer at the current index appears anywhere before this index in the array, set the corresponding bit in the second string to 1, otherwise 0 ("seen before").

    Example

    Arr = [1, 2, 3, 1, 2, 4, 5]
    output: ["1100000", "0001100"]
    
  2. 02

    Update Pod Instances from Log Operations

    Data Structures & Algorithms

    We have n microservices, each with a number of active pod instances given in an integer array pods. We also have m log entries, each represented as a list of three integers [timestamp, podIndex, newValue]. Two types of operations can be performed based on the log entry:

    1. [1, i, v] – set the number of instances of pod i (1‑based index) to v.
    2. [2, -1, v] – update all pods whose current instance count is less than v to v.

    Example

    n = 4
    pods = [1, 2, 3, 4]
    logs = [[1, -1, 3], [2, 2, 20], [1, -1, 1]]
    output: [3, 20, 3, 4]
    

    (Note: timestamps are irrelevant for solving the problem.)

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Salesforce recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!