grindmapcompany-wise LeetCode
All companies

IBM LeetCode Questions

100 questions all-time · 26 easy · 65 medium · 9 hard
# Problem Difficulty Frequency Acceptance
1Exclusive Time of Functions
Array, Stack
Medium
100
64.8%
2Integer to Roman
Hash Table, Math, String
Medium
93
68.6%
3Fizz Buzz
Math, String, Simulation
Easy
90
74.4%
4Roman to Integer
Hash Table, Math, String
Easy
89
64.9%
5Best Time to Buy and Sell Stock
Array, Dynamic Programming
Easy
88
55.3%
6Two Sum
Array, Hash Table
Easy
85
55.8%
7Count Ways to Group Overlapping Ranges
Array, Sorting
Medium
85
38.1%
8Meeting Rooms II
Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue), Prefix Sum
Medium
83
52.1%
9Rotate Image
Array, Math, Matrix
Medium
81
77.9%
10Number of Divisible Triplet Sums
Array, Hash Table
Medium
81
67.8%
11Minimum Absolute Difference
Array, Sorting
Easy
81
70.7%
12Minimum Operations to Make All Array Elements Equal
Array, Binary Search, Sorting, Prefix Sum
Medium
81
36.9%
13Minimum Operations to Make Median of Array Equal to K
Array, Greedy, Sorting
Medium
76
46.7%
14Maximum Profitable Triplets With Increasing Prices I
Array, Binary Indexed Tree, Segment Tree
Medium
74
54.5%
15Find The First Player to win K Games in a Row
Array, Simulation
Medium
74
39.4%
16Activity Participants
Database
Medium
74
72.3%
17The kth Factor of n
Math, Number Theory
Medium
74
69.6%
18Find Products of Elements of Big Array
Array, Binary Search, Bit Manipulation
Hard
72
21.8%
19Merge Intervals
Array, Sorting
Medium
72
49.4%
20Type of Triangle
Array, Math, Sorting
Easy
72
44.8%
21Taking Maximum Energy From the Mystic Dungeon
Array, Prefix Sum
Medium
72
41.1%
22Find Occurrences of an Element in an Array
Array, Hash Table
Medium
72
72.6%
23Find the Array Concatenation Value
Array, Two Pointers, Simulation
Easy
72
71.0%
24String Compression
Two Pointers, String
Medium
72
58.1%
25Minimum Levels to Gain More Points
Array, Prefix Sum
Medium
72
39.1%
26Sort the Students by Their Kth Score
Array, Sorting, Matrix
Medium
72
85.6%
27Longest Substring Without Repeating Characters
Hash Table, String, Sliding Window
Medium
72
36.9%
28Average Value of Even Numbers That Are Divisible by Three
Array, Math
Easy
72
61.7%
29Count the Number of Incremovable Subarrays II
Array, Two Pointers, Binary Search
Hard
72
39.0%
30Minimum Length of String After Operations
Hash Table, String, Counting
Medium
72
74.9%
31Maximum Profitable Triplets With Increasing Prices II
Array, Binary Indexed Tree, Segment Tree
Hard
72
43.3%
32Count Vowel Strings in Ranges
Array, String, Prefix Sum
Medium
72
67.9%
33Maximum Units on a Truck
Array, Greedy, Sorting
Easy
69
74.3%
34Longest Common Prefix
String, Trie
Easy
69
45.5%
35Get Equal Substrings Within Budget
String, Binary Search, Sliding Window, Prefix Sum
Medium
67
59.0%
36Count Binary Substrings
Two Pointers, String
Easy
67
65.9%
37Valid Parentheses
String, Stack
Easy
67
42.3%
38Minimum Suffix Flips
String, Greedy
Medium
64
73.5%
39Letter Combinations of a Phone Number
Hash Table, String, Backtracking
Medium
64
63.9%
40Maximum Sum of Distinct Subarrays With Length K
Array, Hash Table, Sliding Window
Medium
64
42.6%
41Numbers With Repeated Digits
Math, Dynamic Programming
Hard
64
43.5%
42Longest Palindromic Substring
Two Pointers, String, Dynamic Programming
Medium
60
35.8%
43Lexicographically Smallest String After Substring Operation
String, Greedy
Medium
60
32.3%
44Merge Sorted Array
Array, Two Pointers, Sorting
Easy
60
52.9%
45Longest Consecutive Sequence
Array, Hash Table, Union Find
Medium
60
47.0%
46Count Pairs Of Similar Strings
Array, Hash Table, String, Bit Manipulation, Counting
Easy
56
72.5%
47Maximum Subarray
Array, Divide and Conquer, Dynamic Programming
Medium
56
52.1%
48Shortest and Lexicographically Smallest Beautiful String
String, Sliding Window
Medium
56
39.7%
49Spiral Matrix
Array, Matrix, Simulation
Medium
56
53.9%
50Number of Divisible Substrings
Hash Table, String, Counting, Prefix Sum
Medium
56
73.4%
51Validate Binary Search Tree
Tree, Depth-First Search, Binary Search Tree, Binary Tree
Medium
51
34.4%
52Smallest Missing Non-negative Integer After Operations
Array, Hash Table, Math, Greedy
Medium
51
39.9%
53Subarray Product Less Than K
Array, Binary Search, Sliding Window, Prefix Sum
Medium
51
52.9%
54Climbing Stairs
Math, Dynamic Programming, Memoization
Easy
51
53.5%
55Divide Players Into Teams of Equal Skill
Array, Hash Table, Two Pointers, Sorting
Medium
51
68.9%
56Minimum Swaps to Group All 1's Together II
Array, Sliding Window
Medium
51
65.5%
57Group Anagrams
Array, Hash Table, String, Sorting
Medium
51
70.9%
58Find Minimum in Rotated Sorted Array
Array, Binary Search
Medium
44
52.6%
59Median of Two Sorted Arrays
Array, Binary Search, Divide and Conquer
Hard
44
43.8%
60Subsets
Array, Backtracking, Bit Manipulation
Medium
44
80.9%
61Find the Index of the First Occurrence in a String
Two Pointers, String, String Matching
Easy
44
45.0%
62Subarray Sum Equals K
Array, Hash Table, Prefix Sum
Medium
44
45.5%
63Number of Operations to Make Network Connected
Depth-First Search, Breadth-First Search, Union Find, Graph
Medium
44
64.7%
64Palindrome Number
Math
Easy
44
59.2%
65Next Permutation
Array, Two Pointers
Medium
44
43.1%
66Backspace String Compare
Two Pointers, String, Stack, Simulation
Easy
44
49.5%
67Trapping Rain Water
Array, Two Pointers, Dynamic Programming, Stack, Monotonic Stack
Hard
44
65.1%
68Odd String Difference
Array, Hash Table, String
Easy
44
61.1%
69Single-Threaded CPU
Array, Sorting, Heap (Priority Queue)
Medium
44
46.5%
70Rotate Array
Array, Math, Two Pointers
Medium
44
43.0%
71Product of Array Except Self
Array, Prefix Sum
Medium
44
67.8%
72Longest Increasing Subsequence
Array, Binary Search, Dynamic Programming
Medium
44
57.8%
73Flipping an Image
Array, Two Pointers, Bit Manipulation, Matrix, Simulation
Easy
44
83.0%
74Flip String to Monotone Increasing
String, Dynamic Programming
Medium
44
61.6%
75Find The Original Array of Prefix Xor
Array, Bit Manipulation
Medium
44
88.1%
76Intersection of Two Arrays
Array, Hash Table, Two Pointers, Binary Search, Sorting
Easy
44
76.5%
77N-Queens
Array, Backtracking
Hard
35
72.8%
78Find All Possible Stable Binary Arrays II
Dynamic Programming, Prefix Sum
Hard
35
25.9%
79Removing Stars From a String
String, Stack, Simulation
Medium
35
78.0%
80Minimum Number of Flips to Make the Binary String Alternating
String, Dynamic Programming, Sliding Window
Medium
35
40.5%
81Rearrange Array to Maximize Prefix Score
Array, Greedy, Sorting, Prefix Sum
Medium
35
41.5%
82Range Product Queries of Powers
Array, Bit Manipulation, Prefix Sum
Medium
35
41.9%
83Happy Number
Hash Table, Math, Two Pointers
Easy
35
58.1%
84Degree of an Array
Array, Hash Table
Easy
35
57.4%
85Generate Parentheses
String, Dynamic Programming, Backtracking
Medium
35
77.1%
86LRU Cache
Hash Table, Linked List, Design, Doubly-Linked List
Medium
35
45.2%
87Majority Element
Array, Hash Table, Divide and Conquer, Sorting, Counting
Easy
35
65.7%
88Find the Duplicate Number
Array, Two Pointers, Binary Search, Bit Manipulation
Medium
35
62.8%
89Increasing Triplet Subsequence
Array, Greedy
Medium
35
39.1%
90Find Longest Calls
Database
Medium
35
62.8%
91Partition Equal Subset Sum
Array, Dynamic Programming
Medium
35
48.4%
92132 Pattern
Array, Binary Search, Stack, Monotonic Stack, Ordered Set
Medium
35
34.1%
93The Employee That Worked on the Longest Task
Array
Easy
35
50.6%
94Count Number of Teams
Array, Dynamic Programming, Binary Indexed Tree, Segment Tree
Medium
35
70.1%
95Least Number of Unique Integers after K Removals
Array, Hash Table, Greedy, Sorting, Counting
Medium
35
63.4%
96Task Scheduler
Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Counting
Medium
35
61.5%
97Minimum Operations to Reduce an Integer to 0
Dynamic Programming, Greedy, Bit Manipulation
Medium
35
57.3%
98Prime In Diagonal
Array, Math, Matrix, Number Theory
Easy
35
36.2%
99Word Break
Array, Hash Table, String, Dynamic Programming, Trie, Memoization
Medium
35
48.3%
100Maximum Number of Tasks You Can Assign
Array, Two Pointers, Binary Search, Greedy, Queue, Sorting, Monotonic Queue
Hard
35
50.6%

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.