grindmapcompany-wise LeetCode
All companies

Salesforce LeetCode Questions

188 questions all-time · 25 easy · 112 medium · 51 hard
# Problem Difficulty Frequency Acceptance
1Minimum Operations to Reduce an Integer to 0
Medium
100
0.6%
2String Compression
Medium
88
0.6%
3Time Needed to Rearrange a Binary String
Medium
81
0.5%
4LFU Cache
Hard
80
0.5%
5Closest Equal Element Queries
Medium
77
0.5%
6Smallest Substring With Identical Characters I
Hard
73
0.2%
7Smallest Substring With Identical Characters II
Hard
73
0.4%
8Remove Adjacent Almost-Equal Characters
Medium
71
0.5%
9Subarray Product Less Than K
Medium
70
0.5%
10LRU Cache
Medium
67
0.5%
11Maximum Number of Occurrences of a Substring
Medium
67
0.5%
12Maximum Palindromes After Operations
Medium
67
0.5%
13Maximum Product of Three Numbers
Easy
66
0.5%
14Minimize Malware Spread
Hard
66
0.4%
15Distinct Subsequences
Hard
64
0.5%
16Power Grid Maintenance
Medium
64
0.6%
17Longest Substring Without Repeating Characters
Medium
62
0.4%
18Count the Number of Fair Pairs
Medium
62
0.5%
19Maximum Frequency Stack
Hard
62
0.7%
20Minimize Maximum Component Cost
Medium
62
0.4%
21Group Anagrams
Medium
61
0.7%
22Merge Intervals
Medium
61
0.5%
23Check Whether Two Strings are Almost Equivalent
Easy
61
0.6%
24Number of Islands
Medium
61
0.6%
25Course Schedule II
Medium
61
0.6%
26Beautiful Towers II
Medium
61
0.4%
27Beautiful Towers I
Medium
61
0.4%
28Check If a Number Is Majority Element in a Sorted Array
Easy
61
0.6%
29Height Checker
Easy
61
0.8%
30Matrix Similarity After Cyclic Shifts
Easy
61
0.7%
31Number of Self-Divisible Permutations
Medium
61
0.7%
32Maximum Number That Makes Result of Bitwise AND Zero
Medium
61
0.7%
33Find Subarray With Bitwise OR Closest to K
Hard
61
0.3%
34Equalize Strings by Adding or Removing Characters at Ends
Medium
61
0.6%
35Count the Number of Inversions
Hard
61
0.3%
36Find the Minimum Area to Cover All Ones II
Hard
61
0.6%
37Find the Minimum Area to Cover All Ones I
Medium
61
0.8%
38Maximum Height of a Triangle
Easy
61
0.4%
39Maximize Grid Happiness
Hard
61
0.4%
40Average Waiting Time
Medium
61
0.7%
41Split a String in Balanced Strings
Easy
61
0.9%
42Minimum Time to Visit All Houses
Medium
61
0.7%
43Palindromic Substrings
Medium
58
0.7%
44Delete and Earn
Medium
58
0.6%
45Binary Tree Maximum Path Sum
Hard
56
0.4%
46Find the Last Marked Nodes in Tree
Hard
56
0.6%
47Longest Common Subsequence
Medium
56
0.6%
48Best Time to Buy and Sell Stock
Easy
53
0.6%
49Minimum Number of Taps to Open to Water a Garden
Hard
53
0.5%
50Number of Divisible Triplet Sums
Medium
53
0.7%
51K-diff Pairs in an Array
Medium
53
0.5%
52Reverse Nodes in k-Group
Hard
53
0.7%
53All Nodes Distance K in Binary Tree
Medium
53
0.7%
54Count Subarrays With Median K
Hard
53
0.5%
55Minimum Removals to Balance Array
Medium
53
0.5%
56Longest Palindromic Substring
Medium
50
0.4%
57Trapping Rain Water
Hard
50
0.7%
58Min Stack
Medium
50
0.6%
59Count Palindromic Subsequences
Hard
50
0.4%
60Number of Digit One
Hard
50
0.4%
61Two Sum
Easy
50
0.6%
62Zigzag Conversion
Medium
50
0.5%
63Report Spam Message
Medium
50
0.5%
64Minimum Window Substring
Hard
46
0.5%
65Kth Largest Element in an Array
Medium
46
0.7%
66Top K Frequent Elements
Medium
46
0.7%
67Asteroid Collision
Medium
46
0.5%
68Search Suggestions System
Medium
46
0.7%
69Sum of Nodes with Even-Valued Grandparent
Medium
46
0.9%
70Divide Array Into Arrays With Max Difference
Medium
46
0.8%
71Maximum Units on a Truck
Easy
46
0.7%
72Word Search
Medium
46
0.5%
73Koko Eating Bananas
Medium
46
0.5%
74Container With Most Water
Medium
42
0.6%
75Merge k Sorted Lists
Hard
42
0.6%
76Sort Colors
Medium
42
0.7%
77Validate Binary Search Tree
Medium
42
0.4%
78Meeting Rooms II
Medium
42
0.5%
79Coin Change
Medium
42
0.5%
80Rotting Oranges
Medium
42
0.6%
81Word Ladder
Hard
42
0.5%
82Magnetic Force Between Two Balls
Medium
42
0.7%
83Largest Number After Digit Swaps by Parity
Easy
42
0.7%
84Maximum Subarray
Medium
42
0.5%
85Minimum Absolute Difference
Easy
42
0.8%
86Gas Station
Medium
42
0.5%
87Median of Two Sorted Arrays
Hard
42
0.5%
88Minimum Difficulty of a Job Schedule
Hard
42
0.6%
89Boundary of Binary Tree
Medium
42
0.5%
90Odd String Difference
Easy
42
0.6%
91Subarrays with K Different Integers
Hard
42
0.7%
92Remove All Adjacent Duplicates in String II
Medium
42
0.6%
93Path with Maximum Gold
Medium
42
0.7%
943Sum
Medium
36
0.4%
95Valid Parentheses
Easy
36
0.4%
96Search in Rotated Sorted Array
Medium
36
0.5%
97First Missing Positive
Hard
36
0.4%
98Word Break
Medium
36
0.5%
99Maximal Square
Medium
36
0.5%
100Find Median from Data Stream
Hard
36
0.5%
101Decode String
Medium
36
0.6%
102Count Binary Substrings
Easy
36
0.7%
103Top K Frequent Words
Medium
36
0.6%
104Verify Preorder Sequence in Binary Search Tree
Medium
36
0.5%
105Longest Increasing Path in a Matrix
Hard
36
0.6%
106Find Leaves of Binary Tree
Medium
36
0.8%
107Longest Increasing Subsequence
Medium
36
0.6%
108Sliding Window Maximum
Hard
36
0.5%
109Reorganize String
Medium
36
0.6%
110Number of Visible People in a Queue
Hard
36
0.7%
111Max Consecutive Ones III
Medium
36
0.7%
112Optimal Account Balancing
Hard
36
0.5%
113Merge Two Sorted Lists
Easy
36
0.7%
114All Possible Full Binary Trees
Medium
36
0.8%
115Maximal Rectangle
Hard
36
0.6%
116House Robber III
Medium
36
0.6%
117Network Delay Time
Medium
36
0.6%
118Reconstruct Itinerary
Hard
36
0.4%
119Missing Number
Easy
36
0.7%
120Design Twitter
Medium
36
0.4%
121Diameter of N-Ary Tree
Medium
36
0.8%
122Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
Medium
36
0.6%
123Valid Parenthesis String
Medium
36
0.4%
124Course Schedule
Medium
36
0.5%
125Collect Coins in a Tree
Hard
36
0.4%
126Generate Parentheses
Medium
36
0.8%
127Strange Printer
Hard
36
0.6%
128Maximum Team Size with Overlapping IntervalsMedium
36
0.5%
129Integer to Roman
Medium
28
0.7%
130Roman to Integer
Easy
28
0.7%
131Combination Sum
Medium
28
0.8%
132Product of Array Except Self
Medium
28
0.7%
133Masking Personal Information
Medium
28
0.6%
134Maximum Product Subarray
Medium
28
0.4%
135Maximum Number of Ways to Partition an Array
Hard
28
0.4%
136Maximum Number of Non-overlapping Palindrome Substrings
Hard
28
0.4%
137Basic Calculator
Hard
28
0.5%
138K Closest Points to Origin
Medium
28
0.7%
139Exclusive Time of Functions
Medium
28
0.7%
140Shortest Distance to Target String in a Circular Array
Easy
28
0.7%
141Game of Life
Medium
28
0.7%
142Last Stone Weight
Easy
28
0.7%
143Path Sum III
Medium
28
0.5%
144Candy
Hard
28
0.5%
145Maximum Earnings From Taxi
Medium
28
0.5%
146Least Number of Unique Integers after K Removals
Medium
28
0.6%
147Backspace String Compare
Easy
28
0.5%
148Design Snake Game
Medium
28
0.4%
149Find Pivot Index
Easy
28
0.6%
150Encode and Decode TinyURL
Medium
28
0.9%
151Valid Palindrome
Easy
28
0.5%
152Max Chunks To Make Sorted II
Hard
28
0.5%
153Bus Routes
Hard
28
0.5%
154Minimum Equal Sum of Two Arrays After Replacing Zeros
Medium
28
0.5%
155Finding the Number of Visible Mountains
Medium
28
0.4%
156Number of Operations to Make Network Connected
Medium
28
0.7%
157Kth Largest Element in a Stream
Easy
28
0.6%
158Find Duplicate Subtrees
Medium
28
0.6%
159Course Schedule III
Hard
28
0.4%
160House Robber II
Medium
28
0.5%
161Maximum Path Quality of a Graph
Hard
28
0.6%
162Partition Equal Subset Sum
Medium
28
0.5%
163Tree Diameter
Medium
28
0.6%
164Using a Robot to Print the Lexicographically Smallest String
Medium
28
0.6%
165Lexicographically Minimum String After Removing Stars
Medium
28
0.5%
166Shortest Bridge
Medium
28
0.6%
167Count Vowel Substrings of a String
Easy
28
0.7%
168Spiral Matrix
Medium
28
0.6%
169Longest Substring Of All Vowels in Order
Medium
28
0.5%
170Find the Duplicate Number
Medium
28
0.6%
171Minimum Array Sum
Medium
28
0.3%
172Construct Binary Tree from Preorder and Inorder Traversal
Medium
28
0.7%
173Burst Balloons
Hard
28
0.6%
174Time Taken to Cross the Door
Hard
28
0.5%
175Find K Closest Elements
Medium
28
0.5%
176Coin Change II
Medium
28
0.6%
177Sort Characters By Frequency
Medium
28
0.8%
178Time Based Key-Value Store
Medium
28
0.5%
179Vertical Order Traversal of a Binary Tree
Hard
28
0.5%
180Minimum Window Subsequence
Hard
28
0.4%
181Sliding Window Median
Hard
28
0.4%
182Range Sum Query 2D - Immutable
Medium
28
0.6%
183Remove Stones to Minimize the Total
Medium
28
0.7%
184Minimum Replacements to Sort the Array
Hard
28
0.5%
185Partition Array Into Two Arrays to Minimize Sum Difference
Hard
28
0.2%
186Minimum Edge Reversals So Every Node Is Reachable
Hard
28
0.6%
187Subarray Sum Equals K
Medium
28
0.5%
188Largest Rectangle in Histogram
Hard
28
0.5%

How to read this list

The tabs at the top split the questions by how recently people said they were asked in interviews. "Last 30 Days" is the past month, "Last 3 Months" is the past quarter, and so on. "All Time" is every question on record for this company.

Frequency is a score from 0 to 100 for how often a question showed up in that time window. A higher number means it came up more often, so the list starts with the most common questions first. Acceptance is the share of submissions that pass on LeetCode. Click any question to open it on LeetCode.

Similar companies