IBM Coding Interview Questions
101 coding problems are tagged as asked at IBM in interviews and online assessments reported by candidates. By difficulty they split into 37 basic, 53 intermediate and 11 advanced. The topics they most often combine with are Array, String, Hash Table, Sorting.
Reported questions change over time and are not a guarantee of what you will be asked, so use the list to see which patterns IBM tends to test. For each problem, practise explaining your approach, its time and space cost and the edge cases before you write the code; every problem opens in an editor that runs your code against test cases.
Coding problems
- Two Sum (Basic)
- Contains Duplicate (Basic)
- Best Time to Buy and Sell Stock (Basic)
- Maximum Subarray (Intermediate)
- Valid Parentheses (Basic)
- Longest Substring Without Repeats (Intermediate)
- Product of Array Except Self (Intermediate)
- Move Zeroes (Basic)
- Search Insert Position (Basic)
- Rotate Array (Intermediate)
- Climbing Stairs (Basic)
- Coin Change (Intermediate)
- First Unique Character (Basic)
- Kth Largest Element (Intermediate)
- Majority Element (Basic)
- Missing Number (Basic)
- Longest Consecutive Sequence (Intermediate)
- Subarray Sum Equals K (Intermediate)
- Container With Most Water (Intermediate)
- Trapping Rain Water (Advanced)
- Longest Palindromic Substring (Intermediate)
- Valid Anagram (Basic)
- Number of One Bits (Basic)
- Happy Number (Intermediate)
- Sort Colors (Basic)
- Max Consecutive Ones (Basic)
- Find Pivot Index (Basic)
- Valid Mountain Array (Basic)
- Reverse Words in a String (Basic)
- Integer to Roman (Intermediate)
- Roman to Integer (Intermediate)
- Add Binary (Basic)
- Edit Distance (Advanced)
- Longest Valid Parentheses (Advanced)
- Plus One (Basic)
- Search in a Rotated Sorted Array (Advanced)
- Minimum in a Rotated Sorted Array (Intermediate)
- Merge Intervals (Intermediate)
- Sort Characters by Frequency (Intermediate)
- Candy Distribution (Advanced)
- Maximum Units on a Truck (Intermediate)
- Last Stone Weight (Intermediate)
- Kth Missing Positive Number (Basic)
- Longest Mountain Subarray (Intermediate)
- Arithmetic Slices (Intermediate)
- Count Palindromic Substrings (Intermediate)
- Maximum Product Subarray (Intermediate)
- Subarray Sum Equals K (Intermediate)
- Next Permutation (Intermediate)
- Gas Station (Intermediate)
- Container With Most Water (Intermediate)
- Minimum Window Substring (Advanced)
- LRU Cache Operations (Basic)
- Reverse Linked List (Basic)
- Validate Binary Search Tree (Intermediate)
- Middle of the Linked List (Basic)
- Number of Islands (Basic)
- Rotting Oranges (Intermediate)
- Course Schedule Order (Intermediate)
- Operations to Make Network Connected (Intermediate)
- String Compression (Basic)
- Word Search (Intermediate)
- Count Binary Substrings (Basic)
- Min Stack Operations (Basic)
- Simplify Path (Intermediate)
- Asteroid Collision (Intermediate)
- Exclusive Time of Functions (Intermediate)
- Minimum Add to Make Parentheses Valid (Basic)
- Reorganize String (Intermediate)
- Single-Threaded CPU (Intermediate)
- Jump Game II (Intermediate)
- Minimum Increments to Form Target Array (Advanced)
- Rotate Image (Intermediate)
- 3Sum Triplets (Intermediate)
- Boats to Save People (Intermediate)
- Valid Palindrome With One Deletion (Basic)
- Backspace String Compare (Basic)
- Grumpy Bookstore Owner (Intermediate)
- Sliding Window Maximum Values (Advanced)
- Smallest Divisor Given a Threshold (Intermediate)
Related
- IBM basic problems
- IBM intermediate problems
- IBM advanced problems
- IBM Array problems
- IBM String problems
- IBM Hash Table problems
- IBM Sorting problems
- IBM Sliding Window problems
- IBM Stack problems
- Company interview roadmaps
- All interview guides
Frequently asked questions
How should I use the IBM problem list?
Start with the basic problems, then the intermediate and advanced ones, and note which topics repeat. Solve each under a timer, then read the explanation.
Are these the exact IBM interview questions?
They are problems candidates reported being asked. Companies rotate questions, so use them to learn the patterns, not to predict the exact question.