Salesforce SMTS Interview
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.
Full Experience
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.
Interview Questions (5)
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.
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).
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.