Skip to content

IBM Interview Questions and Answers (2026)

IBM’s fresher process is a tight, standard three-round loop - online assessment, technical interview, HR - where clean DSA fundamentals plus a coherent OOPs/SQL story consistently matter more than a high CGPA with weak explanations.

Round Duration What they test
Online Assessment 90-120 min Aptitude + coding
Technical Interview 30-45 min OOPs, SQL, DSA basics, projects
HR Interview 20-30 min Relocation, shifts, motivation

An aptitude-plus-coding screen where the sections generally match what the college placement email promises. Shortlists usually come within a week of clearing the cutoff, and candidates report that speed and accuracy under time pressure matter more than unconventional approaches.

Common questions

  • Aptitude - quantitative and logical reasoning at a standard campus-test difficulty
  • Coding - 1-2 problems, commonly array/string manipulation
  • Time management across sections is explicitly called out by candidates as the deciding factor for shortlisting

Opens with a DSA problem or two, moves into OOPs and SQL domain questions, and closes with a detailed project discussion. Interviewers probe complexity and edge cases rather than just checking for a working answer.

Common questions

  • Palindrome check or reverse a linked list - usually expects a two-pointer approach
  • Character frequency in a string - usually expects a hashmap-based solution
  • SQL - find the maximum salary per department using GROUP BY / joins
  • Explain OOPs concepts in plain language - what breaks or changes at scale
  • Java-leaning follow-ups on APIs, data-structure choices, and failure modes at a fresher depth
  • Detailed project discussion - stack choice, hardest bug you hit, and what you’d rebuild differently

Round-by-round breakdowns are on the IBM interview experience page.

A closing 20-30 minute round on motivation and logistics. Candidates report it’s treated as more than a formality - vague or slogan-heavy answers are noticed.

Common questions

  • Why IBM, and why this role?
  • Are you comfortable with night shifts or relocation?
  • Tell me about a time you had to quickly learn a new technology or tool to get a task done
  • Where do you see yourself in a few years?

Sample answer frameworks for each of these are on the IBM HR interview questions page.

Common technical interview questions and answers

Section titled “Common technical interview questions and answers”
Q: How do you reverse a singly linked list?

Iterate through the list once while re-pointing each node’s next pointer backwards. Keep three references - prev (starts as null), curr (starts at head), and a temporary next. In each iteration: save next = curr.next, set curr.next = prev, then move prev = curr and curr = next. When curr becomes null, prev is the new head. This runs in O(n) time and O(1) extra space, which is the answer interviewers want over building a new list or using a stack. The recursive version is also acceptable but uses O(n) stack space, so mention that trade-off, and remember the edge cases of an empty list and a single-node list.

Q: How do you check whether a string is a palindrome?

Use two pointers, one at index 0 and one at the last index, and compare the characters they point to. If they match, move the left pointer forward and the right pointer backward; if they ever differ, return false immediately. The loop ends when left is greater than or equal to right, at which point the string is a palindrome. This is O(n) time and O(1) space, better than reversing the string and comparing, which costs O(n) extra space. If the interviewer asks for a case-insensitive, alphanumeric-only check, skip non-alphanumeric characters inside the loop and lowercase both characters before comparing.

Q: How do you find the frequency of each character in a string?

Use a hash map from character to count: walk the string once, and for each character increment its entry, inserting it with a count of 1 if it is not present yet. In Java that is map.put(c, map.getOrDefault(c, 0) + 1), and in Python a dict or collections.Counter does the same. This is O(n) time and O(k) space where k is the number of distinct characters. If the input is guaranteed to be lowercase ASCII letters, a fixed int array of size 26 indexed by c - 'a' is faster and uses constant space - mentioning that optimisation is what separates a good answer from a passable one. The same counting technique also answers follow-ups like first non-repeating character and anagram checks.

Q: Write a SQL query to find the maximum salary in each department.

Group the employees by department and take the max: SELECT dept_id, MAX(salary) AS max_salary FROM Employee GROUP BY dept_id. If you also need the department name, join to the Department table and include the name in both the SELECT and GROUP BY. The common follow-up is to return the employee who earns that maximum, which GROUP BY alone cannot do - use a subquery such as SELECT e.* FROM Employee e WHERE e.salary = (SELECT MAX(salary) FROM Employee WHERE dept_id = e.dept_id), or a window function with RANK() OVER (PARTITION BY dept_id ORDER BY salary DESC). Note that the subquery version returns every employee tied at the top salary, which is usually the desired behaviour.

Q: What is the difference between INNER JOIN and LEFT JOIN?

INNER JOIN returns only the rows where the join condition matches in both tables, so an employee with no department and a department with no employees both disappear from the result. LEFT JOIN (short for LEFT OUTER JOIN) returns every row from the left table and fills the right table’s columns with NULL where no match exists, so all employees appear even if their department is missing. RIGHT JOIN is the mirror image, and FULL OUTER JOIN keeps unmatched rows from both sides. A useful trick to remember: LEFT JOIN plus a WHERE right_table.id IS NULL filter gives you exactly the left rows that have no match, which is how you find orphaned records.

Q: What is the difference between abstraction and encapsulation?

Abstraction is about design - it hides complexity by exposing only the essential behaviour of an object, so a caller sees a sendPayment() method on a PaymentGateway interface without knowing whether it talks to a card network or a wallet. Encapsulation is about implementation - it hides data by keeping fields private and forcing access through controlled methods, so a BankAccount can validate that a withdrawal does not exceed the balance. Put simply, abstraction hides what the object does internally at the interface level, while encapsulation protects the object’s state from outside interference. In Java, abstraction is achieved with abstract classes and interfaces; encapsulation is achieved with access modifiers and getters/setters.

Q: What is the difference between method overloading and overriding?

Overloading means several methods in the same class share a name but differ in parameter list - the number, types, or order of parameters. The compiler picks which one to call based on the arguments, so it is resolved at compile time and is sometimes called static or compile-time polymorphism. Return type alone cannot distinguish overloads. Overriding means a subclass provides its own implementation of a method it inherited, with the same name, parameters, and a compatible return type. The JVM picks which version runs based on the actual object at runtime, which is dynamic or runtime polymorphism. An overriding method cannot reduce visibility (a public method cannot become protected) and cannot broaden checked exceptions.

Q: When would you use an ArrayList versus a LinkedList?

ArrayList is backed by a resizable array, so random access by index is O(1) and iteration is fast because the elements sit contiguously in memory and cache well. Its weakness is insertion or deletion in the middle, which costs O(n) because everything after the index shifts, plus an occasional O(n) resize when the backing array grows. LinkedList is a doubly linked list, so inserting or removing at a known node is O(1) pointer surgery, but reaching index i costs O(n) traversal and every node carries pointer overhead. In practice ArrayList is the right default for fresher-level code, and LinkedList only wins when you are repeatedly adding or removing at the ends - and even then ArrayDeque is usually the better queue implementation.

Frequently asked questions about IBM interviews

Section titled “Frequently asked questions about IBM interviews”
What is the IBM interview process for freshers?

IBM placement process includes: 1. Online Assessment (90-120 minutes) - Aptitude, technical, and coding sections. 2. Technical Interview (30-45 minutes) - Programming problems, OOPs/SQL, and project discussion. 3. HR Interview (20-30 minutes) - General discussion about relocation, shifts, and role expectations. Total duration: 2-3 weeks from application to offer.

What questions are asked in IBM interviews?

IBM interviews commonly cover DSA or aptitude screening, core CS (OOPs, SQL), project discussion, and domain topics such as OOPs, SQL, and Java. Behavioural rounds check ownership, teamwork, and why IBM.

How many rounds are there in the IBM interview?

IBM typically has 3 stages: Online Assessment (90-120 min), Technical Interview (30-45 min), HR Interview (20-30 min). Some drives skip a round or merge HR with managerial. Check that cycle’s college placement email.

What coding questions come up in the IBM technical interview?

Common patterns include palindrome checks or reversing a linked list (usually expecting a two-pointer approach), character-frequency counting in a string (hashmap-based), and an SQL query to find the maximum salary per department (GROUP BY / joins). Interviewers typically probe complexity and edge cases after you get a working solution.

What is IBM’s eligibility criteria and starting package for freshers?

Based on student reports, IBM typically expects 6.5+ CGPA (or equivalent percentage) across 10th, 12th, and graduation, with a B.Tech/B.E. in CS, IT, or a related branch. Fresher packages for Associate-level roles have been reported in the roughly Rs 4.5-6 LPA range - always confirm the exact figure on your own offer letter since it varies by role and cycle.

How should I prepare for IBM interviews?

Practise timed DSA and aptitude mocks for the online assessment, revise OOPs and SQL (these open most IBM technical rounds), prepare one crisp project narrative covering your stack choice and hardest bug, and use the STAR method for behavioural answers on relocation, shifts, and motivation.

Looking for placement papers, OA practice, or coding questions?

Section titled “Looking for placement papers, OA practice, or coding questions?”