IBM Coding Interview Questions

170 DSA problems tagged as asked in IBM coding interviews and online assessments. Below are the first 100 of 170: 52 easy, 32 medium and 16 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

IBM DSA problems, easiest first

  1. Add Binary (Easy)
  2. Average Value of Even Numbers That Are Divisible by Three (Easy)
  3. Backspace String Compare (Easy)
  4. Best Time to Buy and Sell Stock (Easy)
  5. Big Countries (Easy)
  6. Check if Array Is Sorted and Rotated (Easy)
  7. Climbing Stairs (Easy)
  8. Contains Duplicate (Easy)
  9. Count Binary Substrings (Easy)
  10. Count Pairs Of Similar Strings (Easy)
  11. Find Pivot Index (Easy)
  12. Find Resultant Array After Removing Anagrams (Easy)
  13. Find the Array Concatenation Value (Easy)
  14. Find the Index of the First Occurrence in a String (Easy)
  15. First Unique Character in a String (Easy)
  16. Fizz Buzz (Easy)
  17. Flipping an Image (Easy)
  18. Height Checker (Easy)
  19. Intersection of Two Arrays II (Easy)
  20. Kth Missing Positive Number (Easy)
  21. Largest Number After Digit Swaps by Parity (Easy)
  22. Last Stone Weight (Easy)
  23. Linked List Cycle (Easy)
  24. Longest Common Prefix (Easy)
  25. Majority Element (Easy)
  26. Max Consecutive Ones (Easy)
  27. Maximum Units on a Truck (Easy)
  28. Merge Sorted Array (Easy)
  29. Merge Strings Alternately (Easy)
  30. Middle of the Linked List (Easy)
  31. Minimum Absolute Difference (Easy)
  32. Minimum Bit Flips to Convert Number (Easy)
  33. Minimum Operations to Make Columns Strictly Increasing (Easy)
  34. Minimum String Length After Removing Substrings (Easy)
  35. Minimum Time to Type Word Using Special Typewriter (Easy)
  36. Minimum Value to Get Positive Step by Step Sum (Easy)
  37. Missing Number (Easy)
  38. Move Zeroes (Easy)
  39. Odd String Difference (Easy)
  40. Palindrome Number (Easy)
  41. Plus One (Easy)
  42. Remove Duplicates from Sorted Array (Easy)
  43. Reverse Linked List (Easy)
  44. Roman to Integer (Easy)
  45. Search Insert Position (Easy)
  46. The Employee That Worked on the Longest Task (Easy)
  47. Two Sum (Easy)
  48. Type of Triangle (Easy)
  49. Valid Anagram (Easy)
  50. Valid Palindrome II (Easy)
  51. Valid Parentheses (Easy)
  52. Water Bottles (Easy)
  53. Count Vowel Strings in Ranges (Medium)
  54. Count Ways to Group Overlapping Ranges (Medium)
  55. Divide Intervals Into Minimum Number of Groups (Medium)
  56. Find Longest Calls (Medium)
  57. Find Occurrences of an Element in an Array (Medium)
  58. Find The First Player to win K Games in a Row (Medium)
  59. Lexicographically Smallest String After Substring Operation (Medium)
  60. Make Lexicographically Smallest Array by Swapping Elements (Medium)
  61. Maximum Profitable Triplets With Increasing Prices I (Medium)
  62. Maximum Sum of Distinct Subarrays With Length K (Medium)
  63. Maximum Value at a Given Index in a Bounded Array (Medium)
  64. Minimize Maximum Pair Sum in Array (Medium)
  65. Minimize XOR (Medium)
  66. Minimum Levels to Gain More Points (Medium)
  67. Minimum Number of Changes to Make Binary String Beautiful (Medium)
  68. Minimum Number of Flips to Make the Binary String Alternating (Medium)
  69. Minimum Number of Swaps to Make the String Balanced (Medium)
  70. Minimum Operations to Make All Array Elements Equal (Medium)
  71. Minimum Operations to Make Median of Array Equal to K (Medium)
  72. Minimum Swaps to Group All 1's Together II (Medium)
  73. Number of Divisible Substrings (Medium)
  74. Number of Divisible Triplet Sums (Medium)
  75. Optimal Partition of String (Medium)
  76. Rearrange Array to Maximize Prefix Score (Medium)
  77. Remove All Occurrences of a Substring (Medium)
  78. Remove Colored Pieces if Both Neighbors are the Same Color (Medium)
  79. Removing Stars From a String (Medium)
  80. Shortest and Lexicographically Smallest Beautiful String (Medium)
  81. Single-Threaded CPU (Medium)
  82. Smallest Missing Non-negative Integer After Operations (Medium)
  83. Sort the Students by Their Kth Score (Medium)
  84. Taking Maximum Energy From the Mystic Dungeon (Medium)
  85. Candy (Hard)
  86. Count the Number of Incremovable Subarrays II (Hard)
  87. Find All Possible Stable Binary Arrays II (Hard)
  88. Find Products of Elements of Big Array (Hard)
  89. Last Substring in Lexicographical Order (Hard)
  90. Longest Valid Parentheses (Hard)
  91. Maximum Profitable Triplets With Increasing Prices II (Hard)
  92. Median of Two Sorted Arrays (Hard)
  93. Merge k Sorted Lists (Hard)
  94. Minimum Insertion Steps to Make a String Palindrome (Hard)
  95. Minimum Number of Increments on Subarrays to Form a Target Array (Hard)
  96. Minimum Number of Moves to Make Palindrome (Hard)
  97. Minimum Window Substring (Hard)
  98. N-Queens (Hard)
  99. Sliding Window Maximum (Hard)
  100. Trapping Rain Water (Hard)

Prepare for the rest of the IBM process

Other companies