salesforce logo
Salesforce· MTS II

Salesforce SMTS Interview

Posted
16 Jan 2025
459 reads

Summary

I interviewed for an SMTS role at Salesforce, which involved an online assessment followed by two coding rounds. The assessment and rounds featured a mix of standard LeetCode problems covering dynamic programming, tree data structures, and string manipulation, along with a custom sliding window problem.

How it went

My interview journey for the SMTS position at Salesforce began with an Online Assessment. The OA included the LeetCode problem 'Distinct Subsequences', and another medium-difficulty question whose specifics I couldn't recall. Following the OA, I had two distinct coding rounds.

In the first coding round, I was presented with the LeetCode problem 'Construct Quad Tree'. Additionally, there was a custom question that involved a sliding window technique. This problem required me to process a 2D list of person IDs and their card swipe times, determining the maximum number of swipes made by any single person within a specific time window.

The second coding round focused on more advanced data structure challenges. I was asked to solve 'Binary Tree Maximum Path Sum' and 'Encode and Decode Strings', both well-known problems from LeetCode.

Questions asked (5)

  1. 01

    Distinct Subsequences

    Data Structures & Algorithms · Hard

    Given two strings s and t, return the number of distinct subsequences of s which equals t. The test cases are generated so that the answer fits on a 32-bit signed integer.

    Open the problem
  2. 02

    Construct Quad Tree

    Data Structures & Algorithms · Medium

    Given an n * n grid of 1s and 0s, construct a quad tree representation of the grid. A quad tree is a tree data structure in which each internal node has exactly four children. Quad trees are most often used to partition a two-dimensional space by recursively subdividing it into four quadrants or regions.

    Open the problem
  3. 03

    Max Card Swipes by Person in Window

    Data Structures & Algorithms · Medium

    I was given a 2D list containing person IDs and their card swipe times in HHMM format, for example: [ ["d","0002"], ["e","0215"],["c","0808"], ["c","0809"], ["c","0829"], ["c","0850"],["c","0855"],["d","1410"],["d","1444"],["d","1508"],["d","1602"],]. The task was to identify and return the maximum number of swipes made by any single person within a specified time window (e.g., a 60-minute interval).

  4. 04

    Binary Tree Maximum Path Sum

    Data Structures & Algorithms · Hard

    A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence at most once. The path does not necessarily need to pass through the root. Given the root of a binary tree, return the maximum path sum of any non-empty path.

    Open the problem
  5. 05

    Encode and Decode Strings

    Data Structures & Algorithms · Medium

    Design an algorithm to encode a list of strings to a single string. The encoded string is then decoded back to the original list of strings. The problem statement usually implies the need for a robust method to handle special characters and an arbitrary number of strings.

    Open 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!