Salesforce | SMTS | Interview Experience
Summary
I recently interviewed at Salesforce for an SMTS Backend role, successfully navigating a HackerRank coding assessment and a virtual DSA round. While I solved most of the problems, I ran out of time implementing the optimal solution for a challenging design question.
Full Experience
I was approached by a recruiter for the SMTS Backend role at Salesforce, which led to an interview process comprising two main rounds.
Round 1: Platform - HackerRank
This round consisted of two coding questions, to be completed within 75 minutes. The first question was a variant of Remove Duplicates from Unsorted Linked List, requiring me to ensure only a single occurrence of numbers. The second was a variant of Kth Largest Element in an Array. I managed to solve both problems efficiently within 40 minutes.
Round 2: Virtual DSA Coding Round
This round also presented two questions, with a 60-minute time limit. The first question was a variant of Reconstruct Itinerary, simplified by the constraint that the input would not contain any loops or multiple paths. I solved this problem using a hashmap and a set in approximately 30 minutes, and the interviewer seemed satisfied with my approach.
The second question was to design a Queue with an O(1) getMax() operation. I initially considered using a queue combined with a monotonic increasing stack, but while coding, I realized a monotonic deque, similar to the technique used in the Sliding Window Maximum problem, would be a more suitable approach. Unfortunately, I was unable to complete the deque solution within the remaining 30 minutes.
Interview Questions (4)
Design a queue data structure that supports a getMax() operation, which returns the maximum element currently in the queue in O(1) time complexity. The standard queue operations (enqueue, dequeue) should also be efficient.