356 questions · from 92 interviews · 16 asked more than once
Salesforce interview questions
Every question candidates reported from their Salesforce interviews, most frequently asked first. Each links to the write-up it came from, so you can see the round and how it went.
Salesforce coding and DSA questions
- 01
Longest Substring Without Repeating Characters
LeetCode 3: Longest Substring Without Repeating Characters.
Medium · Asked 5 times · From Salesforce | MTS | Selected
- 02
Rotting Oranges
Given a grid of integers where each cell can be empty, fresh orange, or rotten orange, determine the minimum number of minutes that must elapse until no cell has a fresh orange. Each minute, any fresh orange that is adjacent to a rotten orange becomes rotten.
Medium · Asked 3 times · From Salesforce AMTS Interview Experience | India | Pool Campus Hiring
- 03
Number of Islands
Given a 2D grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically.
Medium · Asked 3 times · From Salseforce MTS interview experience
- 04
Merge Intervals
Given a collection of intervals, merge all overlapping intervals and return the resulting list of intervals.
Medium · Asked 2 times · From Salesforce MTS Interview Experience | India | August 2026
- 05
LRU Cache
Design and implement a data structure for a Least Recently Used (LRU) cache. It should support get(key) and put(key, value) operations in O(1) time.
Medium · Asked 2 times · From Salesforce MTS Interview Experience | India | 2026
- 06
Maximal Square
Given a 2D binary matrix filled with '0's and '1's, find the largest square containing only '1's and return its area.
Medium · Asked 2 times · From Salesforce - MTS - Interview Experience ( Rejected )
- 07
Longest Increasing Subsequence
Given an integer array, determine the length of the longest strictly increasing subsequence.
Medium · Asked 2 times · From Salesforce - MTS - Interview Experience ( Rejected )
- 08
Meeting Rooms II
Given an array of meeting time intervals consisting of start and end times [start, end] , find the minimum number of conference rooms required so that all meetings can take place without overlap.
Medium · Asked 2 times · From Salesforce | MTS | Bangalore | May 2026
- 09
String Compression
The problem asked to compress an array of characters. You are given an array of characters chars, compress it using the following algorithm: Begin with an empty string s. For each group of consecutive repeating characters in chars: If the group's length is 1,…
Medium · Asked 2 times · From Salesforce OA
- 10
Product of Array Except Self
Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. You must write an algorithm that…
Medium · Asked 2 times · From Salesforce | MTS (SDE-2) | Interview Experience | Rejected
- 11
Distinct Subsequences
Given two strings s and t, return the number of distinct subsequences of s which equals t.
Hard · Asked 2 times · From Salesforce OA SMTS | USA
- 12
Binary Tree Maximum Path Sum
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…
Hard · Asked 2 times · From Salesforce SMTS Interview
- 13
The Kth Factor of N
Given two positive integers n and k. A factor of an integer n is a positive integer i that divides n exactly, i.e., n % i == 0. Consider a list of all factors of n sorted in ascending order. Return the k-th factor in this list or -1 if n has less than k…
Easy · Asked 2 times · From Salesforce | SMTS | May 2024 | Hyderabad | Reject
- 14
Search Suggestions System
Given an array of strings products and a string searchWord , design a system that suggests at most three product names from products after each character of searchWord is typed. Suggested products should have searchWord as a prefix and be lexicographically…
Medium · Asked 2 times · From Salesforce | SMTS | Hyderabad | 16th Dec
- 15
Kth Largest Element in an Array
Given an unsorted integer array, find the kth largest element in the array.
From Salesforce AMTS Interview Experience | India | Pool Campus Hiring
- 16
Best Time to Buy and Sell Stock - DP version
Given an array where the i-th element is the price of a given stock on day i, find the maximum profit you can achieve. You may complete as many transactions as you like (i.e., buy one and sell one share multiple times) but with an additional constraint such…
From Salesforce AMTS Interview Experience | India | Pool Campus Hiring
- 17
Implement LRU Cache
Design and implement a Least Recently Used (LRU) cache with O(1) time complexity for get and put operations. The cache should support setting a capacity, retrieving a value by key, and inserting or updating a key-value pair.
From Salesforce AMTS Interview Experience | India | Pool Campus Hiring
- 18
Implement LFU Cache
Design and implement a Least Frequently Used (LFU) cache that supports get and put operations in O(1) time. The cache should evict the least frequently used key when capacity is exceeded, and break ties using the least recently used policy.
From Salesforce AMTS Interview Experience | India | Pool Campus Hiring
- 19
Maximum requests within a window
Given an array of request timestamps and a window size, find the maximum number of requests that can be allowed within any window. Example: requestTime = [1, 3, 4, 5, 7] windowSize = 4 For a window starting at 1, requests with timestamps < 5 are included, so…
From Salesforce MTS Interview Experience | India | August 2026
- 20
Splitting an array into partitions
Given an array and a required number of partitions, split the array into the required number of non‑empty subarrays. For each split, the cost is determined using the values at the split indices (start & end). Find the maximum and minimum possible total cost.…
From Salesforce MTS Interview Experience | India | August 2026
- 21
Maximum Profit in Job Scheduling
Given start time, end time and profit arrays for tasks, select a subset of non‑overlapping tasks to maximize total profit.
Medium · From Salesforce MTS Interview Experience | India | August 2026
- 22
Task Dependency Query
Given a list of task dependencies (e.g., dependencies = [['a', 'b'], ['c', 'b']]) and multiple queries, determine whether one task is a direct or indirect dependency of another task.
From Salesforce MTS Interview Experience | India | August 2026
- 23
Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if open brackets are closed by the same type of brackets, and open brackets are closed in the correct order.
Easy · From Salesforce MTS Interview Experience | India | 2026
- 24
Budget / Project Selection (DP)
Given a list of projects each with a required budget and an expected profit, and a total budget limit, select a subset of projects such that the total profit is maximized while staying within the budget.
Medium · From Salesforce MTS Interview Experience | India | 2026
- 25
Path With Maximum Probability
Given an undirected weighted graph where each edge has a success probability, and two nodes start and end, find the path from start to end that maximizes the product of probabilities along the edges.
Medium · From Salesforce MTS Interview Experience | India | 2026
194 more in the Salesforce write-ups.
Salesforce system design questions
- 01
Design Ludo Game
Design the classes and UML for a Ludo board game, covering board representation, player, token, dice, and movement logic. Adjusted the board model from a 2D structure to a linear list of cells to better represent movement paths.
From Salesforce MTS Interview Experience | India | August 2026
- 02
Elevator System Design
Design an elevator system. Identify major objects/classes, their responsibilities, elevator state, handling of elevator requests, assignment of an elevator to a request, and the algorithm for selecting an elevator to minimize customer wait time. Discuss…
- 03
Watch Party System Design
Design a Watch Party system that enables a host to create a virtual room where multiple users can join using a unique Room ID and watch a movie together in a synchronized manner. The system should support real-time playback controls such as Play, Pause, Seek,…
- 04
Venue Rental System Design
Design a system for renting out a ground/venue to organizations such as schools, societies, and event organizers. The venue can be booked through different rental packages. The design should cover core entities, database schema, APIs, and relationships…
- 05
Distributed Rate Limiter Design
Design a distributed rate‑limiting system that can be applied at various granularities (per user, per IP, per API key, per tenant). Discuss multiple algorithms (Token Bucket, Leaky Bucket, Fixed Window Counter, Sliding Window Log/Counter) and their trade‑offs…
- 06
Food Delivery App Low‑Level Design
Create a low‑level design for a food delivery platform. Identify core entities (User, Restaurant, MenuItem, Order, Cart, DeliveryAgent, Payment) and define their relationships. Design an order state machine (placed → confirmed → preparing → pickedup →…
- 07
Parking Lot Design
Design a parking lot system considering various constraints such as entry/exit points, vehicle types, payment systems, and concurrency handling.
- 08
Book My Show Seat Booking System Design
Design a system similar to BookMyShow capable of handling concurrent users attempting to book seats simultaneously while ensuring consistency and avoiding race conditions.
- 09
Design BookMyShow
Low-level design question focused on designing a ticket booking system similar to BookMyShow. Emphasis was placed on class design, applying design principles, and handling issues such as double bookings.
- 10
Design Uber
High-level system design question involving the design of a ride-sharing service like Uber. Key focus areas included ride matching logic, surge pricing mechanisms, and how drivers accept rides. Also included discussion about existing project architecture from…
- 11
Design Component for Logging Workflow State Transitions
Design a component that logs the state transitions of workflow steps. Each workflow consists of multiple steps with defined states (e.g., Pending, Running, Completed/Failed). Need to track and persist state changes over time.
- 12
Design Login System
Design a login system, covering authentication flow, data storage, and security aspects, without concrete requirements and without allowing clarification questions.
From Salesforce Interview SMTS | MissionForce Team | Hyderabad location
- 13
Design Splitwise‑like Expense Sharing System
Create a design for an expense‑sharing application similar to Splitwise, focusing on equal split, percentage split, extensibility of expense types, and clean object modelling.
From Salesforce Interview SMTS | MissionForce Team | Hyderabad location
- 14
Design a Flash Sale System
This involved designing a high concurrency system with a strong focus on consistency over availability. Topics included race conditions, locking mechanisms, inventory management, rate limiting, and queues.
- 15
Design a Library Management System
The discussion was around designing a simple Library Management System. Entities discussed: Library, Book, Author, Transaction. We discussed how the tables would relate to each other and how books could be queried based on author and book name. API design:…
From Salesforce | AMTS | Bangalore | Jan 2026 | Interview Experience
- 16
Design Meeting Scheduler
Design a Meeting Scheduler system. The focus was on class design, concurrency handling, and patterns like Observer and Singleton.
Hard · From Salesforce SDE2 March 2026
- 17
Scale Notification System
Discussion on scaling a notification system for millions of users.
Hard · From Salesforce SDE2 March 2026
- 18
Design Flash Sale System
Design a flash sale system for a single product. The sale starts at a particular time. The system should prioritize low latency and consistency over availability.
- 19
Thread-Safe Task Scheduler Design
Implement a thread-safe task scheduler.
Hard · From Salesforce | SMTS | Interview Experience
- 20
Implement Observer Pattern
Implement the Observer Pattern. After that, I was asked to modify the implementation for Kafka (Producer and Consumer) and later asked a few additional questions related to Kafka.
Medium · From Salesforce | SMTS | Interview Experience
- 21
Agent Workflow Design for Bank Document Processing
Design an agent workflow to process bank documents.
- 22
Microservices, Kafka, and API Design Discussion
Technically deep discussions around microservices, Kafka, and APIs, along with situational and decision-making scenarios.
- 23
Low-Level Design Problem (Java)
A simple Low-Level Design (LLD) problem requiring the definition of Java classes, methods, and basic interactions between entities.
- 24
HLD of Metric Collection System
High-Level Design (HLD) of a Metric Collection system. I had never seen the design of this, nor did I work with such systems. So, based on the requirements, I made it the best I could.
- 25
LLD of Spotify
Low-Level Design (LLD) of Spotify. I was asked to provide class diagrams only. I made them.
53 more in the Salesforce write-ups.
Salesforce behavioural and HR questions
- 01
Why Salesforce?
A cultural fit question: 'Why Salesforce?'
Asked 3 times · From Salesforce SDE2 March 2026
- 02
Behavioral Questions
She also asked a few behavioral questions based on my work.
Asked 2 times · From Salesforce | SMTS | Interview Experience
- 03
Conflict Resolution and Project Impact
I was asked basic questions about how I would handle conflict with team members and to discuss past projects where I made a significant impact.
- 04
Discuss Current Work Experience
Discuss your current work experience, tech stack, and cultural fit.
- 05
- 06
Conflict with QA Team
How will you handle conflicts specifically with the QA team?
- 07
Bug in Production Experience
Tell me about a scenario where you pushed a bug to production that caused an issue. What steps did you take, including creating an RCA (Root Cause Analysis), adding E2E tests, and other mitigation steps?
- 08
Difficult Colleague Experience
Tell me about a scenario when working with someone was very difficult and how you handled it.
- 09
Standard Behavioral and Project Discussion
I was asked to discuss a project of my choice, explaining design choices, my role's impact, and challenges faced. Standard behavioral questions included: 'Tell me about a calculated risk you took', 'Have you ever failed in your projects?', 'Provide an example…
- 10
Project Execution & Stakeholder Prioritization
Discuss the execution strategy of a project requiring collaboration and how to prioritize tasks with stakeholders.
- 11
Project Deep Dive and Technical Leadership
- Deep dive on a project you have worked on, what component you own and how did you implement that. - How do you get your Design doc approved - What are the tools, language and infra you used for the project. - What were the most challenging part of your…
- 12
Conflict Resolution and On-call Handling
- How did you resolve confict in your workplace? - How do you handle on-call issues with example - How do you convince your seniors and managers for a work related confict.
- 13
Behavioral: Why Change Jobs?
Questions around why I wanted to change jobs, followed by cross-questioning and rapid-fire questions.
From Salesforce chances
- 14
Behavioral: Current Projects and Workflow
Questions about my current projects and their workflow.
From Salesforce chances
- 15
How will you approach the work?
How will you approach the work?
- 16
How will you react to PR comments?
How will you react to PR comments?
- 17
How will you handle criticism from seniors?
How will you handle criticism from seniors?
- 18
How will you react to design changes?
How will you react to design changes?
- 19
Behavioral: Project Deep Dives and Leadership Principles
Project deep dives and leadership principle-style questions focused on ownership, technical decision-making, and collaboration.
From Salesforce Interview Experience | LMTS | April 2025 | Offer
- 20
Approach to Work
How will you approach your work?
From Salesforce | MTS (SDE-2) | Interview Experience | Rejected
- 21
Reacting to PR Comments
How will you react to Pull Request comments?
From Salesforce | MTS (SDE-2) | Interview Experience | Rejected
- 22
Handling Criticism from Seniors
How will you handle criticism from seniors?
From Salesforce | MTS (SDE-2) | Interview Experience | Rejected
- 23
Reacting to Design Changes
How will you react to design changes?
From Salesforce | MTS (SDE-2) | Interview Experience | Rejected
- 24
Behavioral: Mistake and Team Lead's Reaction
Describe a time when you made a mistake and messed up a task. What was your team lead's reaction, and what steps did you take to avoid such mistakes in the future?
- 25
Behavioral: Receiving Feedback
Describe a time when you received feedback from someone. What was your reaction, and what steps did you take regarding that feedback?
14 more in the Salesforce write-ups.
Salesforce other questions
- 01
Undefined Destructor for Dynamic Memory
What happens if a class dynamically allocates memory but no destructor is defined
From Salesforce | AMTS | Bangalore | Jan 2026 | Interview Experience
- 02
Can a Constructor be Private
Can a constructor be private
From Salesforce | AMTS | Bangalore | Jan 2026 | Interview Experience
- 03
Difference between Abstraction and Encapsulation
Difference between abstraction and encapsulation
From Salesforce | AMTS | Bangalore | Jan 2026 | Interview Experience
- 04
Frontend Performance: FPS & CSS Animations
What is FPS (Frames Per Second) and why is it important? What types of CSS properties should we avoid animating, and why are transform and opacity generally preferred for performant animations?
- 05
Canvas vs. DOM for Performance
What is Canvas and why is it better for performance compared to traditional DOM rendering?
- 06
Semantic HTML
What is semantic HTML? Why should we follow semantic HTML instead of using only divs?
- 07
CSS Layout: Flexbox vs. Grid
Explain the difference between Flexbox and Grid. Implement a layout using CSS Grid.
- 08
Responsive Web Design Techniques
How do you make your application responsive? Discuss techniques like media queries, relative sizes, etc.
- 09
JavaScript: call, apply, bind & Polyfill
What are call , apply , and bind in JavaScript? Explain their differences. Write a polyfill for the bind method.
- 10
Critical Rendering Path & CSSOM
What is the Critical Rendering Path? Explain the CSSOM (CSS Object Model).
- 11
JavaScript Event Loop
How does the JavaScript Event Loop work?
- 12
React: forwardRef & useImperativeHandle
What does the forwardRef hook do? What do you know about the useImperativeHandle hook in React?
- 13
React: Props Drilling & Solutions
What is props drilling in React and how can you fix it?
- 14
Client Side Rendering
What is Client Side Rendering (CSR)? When is it beneficial to use CSR?
- 15
Resource Hinting Techniques
What are different resource hinting techniques in web performance?
- 16
Improving INP (Interaction to Next Paint)
How would you improve the INP (Interaction to Next Paint) web vital?
- 17
Discuss Architecture of a Complex Project
Walkthrough the architecture of one of the complex projects you've worked on, discussing design decisions made and cost considerations.
- 18
Puzzle: Split N Coins into Two Groups with Same Number of Heads
Given N number of coins, split them into two groups such that both groups have the same number of heads.
Easy · From Salesforce MTS Onsite | Hyderabad
- 19
Debugging APIs and Table Population Performance
How do you debug APIs? What is your approach? Discuss API patterns and their data flow in the frontend. If you have a table populating an API payload and data is not populating, what could be the possibilities for this issue? How would you increase the table…
- 20
SQL Query with Left Outer Join
I was given a specific scenario and tasked with writing an SQL query that correctly uses a Left Outer Join to retrieve the required data.
Medium · From Salesforce | SMTS | Bangalore | April 2021[Passed]
Salesforce interview questions FAQ
What questions are asked in Salesforce interviews?
Candidates reported 356 distinct questions across 92 Salesforce interviews. 219 coding and DSA questions, 78 system design questions, 39 behavioural and HR questions, 20 other questions.
Which Salesforce interview questions are asked most often?
The most repeated are "Longest Substring Without Repeating Characters" (5 times), "Rotting Oranges" (3 times), "Number of Islands" (3 times), "Why Salesforce?" (3 times), "Merge Intervals" (2 times).
How difficult are Salesforce interview questions?
Of the questions candidates rated, 14% were easy, 58% medium and 28% hard.