PapersAdda

Ibm Interview Questions 2026

24 min read
Interview Questions
Advertisement Placement

IBM Interview Questions 2026 (with Answers for Freshers)

Last Updated: March 2026


About IBM

International Business Machines (IBM) is an American multinational technology company with a storied history spanning over a century. With operations in more than 170 countries and approximately 280,000 employees, IBM has evolved from hardware pioneer to cloud and AI leader. Today, IBM focuses on hybrid cloud and AI through its watsonx platform, consulting services, and infrastructure. The company is known for its research contributions, holding the most U.S. patents for 29 consecutive years, and its commitment to innovation, diversity, and ethical technology development.


IBM Selection Process Overview

RoundDescriptionDurationKey Focus Areas
Round 1: Cognitive AbilityIPAT (IBM Personal Assessment Tool)90-120 minsNumerical Series, Verbal, Logical Reasoning
Round 2: Coding AssessmentProgramming skills test60 minsData Structures, Algorithms, Problem Solving
Round 3: English LanguageCommunication test20-30 minsGrammar, Reading, Listening
Round 4: Technical InterviewTechnical discussion30-45 minsProgramming, Projects, CS Concepts
Round 5: HR InterviewBehavioral screening15-20 minsCulture fit, Expectations, Attitude

HR Interview Questions with Answers

Q1: Why do you want to work at IBM?

Q2: What do you know about IBM's current business?

Software: Includes hybrid platform and solutions (Red Hat OpenShift, Cloud Paks), transaction processing, and AI software (watsonx). This is IBM's highest-margin business.

Consulting: IBM Consulting helps clients with digital transformation, leveraging IBM's technology expertise. It works across strategy, experience, technology, and operations.

Infrastructure: Includes hybrid infrastructure (IBM Z, Distributed Infrastructure) and infrastructure support. IBM Z mainframes remain critical for financial transactions worldwide.

Financing: IBM Global Financing facilitates client purchases and provides used equipment sales.

Strategic Focus Areas:

  • watsonx: IBM's AI and data platform for enterprise AI
  • Hybrid Cloud: Through Red Hat OpenShift, helping clients modernize applications
  • Quantum Computing: IBM leads in quantum research with accessible quantum systems
  • Sustainability: Commitment to net zero greenhouse gas emissions by 2030

IBM has shifted from commodity IT services to high-value software and consulting focused on hybrid cloud and AI."

Q3: How do you handle failure or setbacks?

Q4: Describe a time when you had to work with limited resources.

Q5: What is your approach to continuous learning?

Q6: How do you prioritize competing deadlines?

Q7: Tell me about a time you demonstrated leadership.

Q8: What motivates you to perform well at work?

Q9: How do you handle ambiguity in requirements?

Q10: What are your long-term career aspirations?


Technical Interview Questions with Answers

Q1: Write a program to find the missing number in an array of 1 to N.

public class MissingNumber {
    // Method 1: Using sum formula (Optimal)
    public static int findMissingNumber(int[] arr, int n) {
        // Sum of 1 to N = N * (N + 1) / 2
        int expectedSum = n * (n + 1) / 2;
        int actualSum = 0;
        
        for (int num : arr) {
            actualSum += num;
        }
        
        return expectedSum - actualSum;
    }
    
    // Method 2: Using XOR (No overflow risk)
    public static int findMissingXOR(int[] arr, int n) {
        int xor1 = 0; // XOR of 1 to n
        int xor2 = 0; // XOR of array elements
        
        for (int i = 1; i <= n; i++) {
            xor1 ^= i;
        }
        
        for (int num : arr) {
            xor2 ^= num;
        }
        
        return xor1 ^ xor2;
    }
    
    // Method 3: Using sorting (less optimal)
    public static int findMissingSort(int[] arr) {
        java.util.Arrays.sort(arr);
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] != i + 1) {
                return i + 1;
            }
        }
        return arr.length + 1;
    }
    
    public static void main(String[] args) {
        int[] arr = {1, 2, 4, 5, 6}; // Missing 3
        int n = 6;
        System.out.println("Missing number: " + findMissingNumber(arr, n)); // 3
    }
}

Time Complexity:

  • Sum formula: O(n)
  • XOR: O(n)
  • Sorting: O(n log n)

Space Complexity: O(1) for all methods

XOR method prevents integer overflow for large N.

Q2: Explain the concept of Object-Oriented Programming.

1. Encapsulation: Bundling data and methods that operate on that data within a single unit (class), while restricting direct access to some components.

class BankAccount {
    private double balance; // Hidden data
    
    public void deposit(double amount) { // Controlled access
        if (amount > 0) balance += amount;
    }
    
    public double getBalance() {
        return balance;
    }
}

2. Abstraction: Hiding complex implementation details and showing only essential features.

abstract class Vehicle {
    abstract void start(); // What, not how
    abstract void stop();
}

3. Inheritance: Creating new classes from existing ones, promoting code reuse.

class ElectricCar extends Car {
    // Inherits from Car, adds specific behavior
    void chargeBattery() { }
}

4. Polymorphism: Objects can take multiple forms. Method overloading (compile-time) and overriding (runtime).

Benefits: Modularity, code reusability, maintainability, real-world modeling."

Q3: Write a SQL query to find the second highest salary.

-- Method 1: Using subquery with MAX (Standard SQL)
SELECT MAX(salary) as SecondHighest
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);

-- Method 2: Using LIMIT/OFFSET (MySQL/PostgreSQL)
SELECT DISTINCT salary
FROM employees
ORDER BY salary DESC
LIMIT 1 OFFSET 1;

-- Method 3: Using DENSE_RANK (Best for duplicates)
SELECT salary
FROM (
    SELECT salary,
           DENSE_RANK() OVER (ORDER BY salary DESC) as rank
    FROM employees
) ranked
WHERE rank = 2;

-- Method 4: Using TOP (SQL Server)
SELECT TOP 1 salary
FROM (
    SELECT DISTINCT TOP 2 salary
    FROM employees
    ORDER BY salary DESC
) sub
ORDER BY salary ASC;

-- Method 5: Using self-join
SELECT DISTINCT e1.salary
FROM employees e1
WHERE 1 = (
    SELECT COUNT(DISTINCT e2.salary)
    FROM employees e2
    WHERE e2.salary > e1.salary
);

DENSE_RANK is recommended as it handles duplicate salaries correctly.

Q4: What is the difference between Primary Key and Unique Key?

Primary Key:

CREATE TABLE students (
    student_id INT PRIMARY KEY,
    email VARCHAR(100),
    name VARCHAR(100)
);
  • Identifies each row uniquely
  • Cannot be NULL
  • Often auto-incremented

Unique Key:

CREATE TABLE employees (
    emp_id INT PRIMARY KEY,
    email VARCHAR(100) UNIQUE,
    ssn VARCHAR(20) UNIQUE
);
  • Ensures no duplicate values
  • Can have one NULL (in most databases)
  • Multiple unique keys allowed per table

When to use:

  • Primary Key: Main identifier for the row
  • Unique Key: Alternate identifiers or business-required uniqueness

Note: A table can have only one PRIMARY KEY but multiple UNIQUE constraints."

Q5: Write a program to reverse a linked list.

class ListNode {
    int val;
    ListNode next;
    
    ListNode(int val) {
        this.val = val;
    }
}

public class ReverseLinkedList {
    // Iterative approach (preferred)
    public static ListNode reverseIterative(ListNode head) {
        ListNode prev = null;
        ListNode current = head;
        ListNode next = null;
        
        while (current != null) {
            next = current.next;  // Store next
            current.next = prev;  // Reverse link
            prev = current;       // Move prev forward
            current = next;       // Move current forward
        }
        
        return prev; // New head
    }
    
    // Recursive approach
    public static ListNode reverseRecursive(ListNode head) {
        // Base case
        if (head == null || head.next == null) {
            return head;
        }
        
        // Reverse rest of list
        ListNode rest = reverseRecursive(head.next);
        
        // Put first element at end
        head.next.next = head;
        head.next = null;
        
        return rest;
    }
    
    // Helper to print list
    public static void printList(ListNode head) {
        while (head != null) {
            System.out.print(head.val + " -> ");
            head = head.next;
        }
        System.out.println("null");
    }
    
    public static void main(String[] args) {
        // Create list: 1 -> 2 -> 3 -> 4 -> 5
        ListNode head = new ListNode(1);
        head.next = new ListNode(2);
        head.next.next = new ListNode(3);
        head.next.next.next = new ListNode(4);
        head.next.next.next.next = new ListNode(5);
        
        System.out.println("Original:");
        printList(head);
        
        head = reverseIterative(head);
        
        System.out.println("Reversed:");
        printList(head); // 5 -> 4 -> 3 -> 2 -> 1 -> null
    }
}

Time Complexity: O(n) Space Complexity: O(1) iterative, O(n) recursive (call stack)

Q6: Explain the difference between HTTP and HTTPS.

HTTP (HyperText Transfer Protocol):

  • Sends data in plaintext
  • Vulnerable to eavesdropping and man-in-the-middle attacks
  • Suitable for non-sensitive information

HTTPS (HTTP Secure):

  • Encrypts data using SSL/TLS protocols
  • Uses public-key cryptography for initial handshake
  • Symmetric encryption for data transfer
  • Certificate Authorities (CA) verify server identity

How HTTPS Works:

  1. Client requests secure connection
  2. Server sends SSL certificate (contains public key)
  3. Client verifies certificate with CA
  4. Client generates session key, encrypts with server's public key
  5. Server decrypts session key with private key
  6. Secure symmetric communication established

Always use HTTPS for: Login pages, payment information, personal data, any authenticated sessions."

Q7: Write a program to check if a binary tree is balanced.

class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;
    
    TreeNode(int val) {
        this.val = val;
    }
}

public class BalancedBinaryTree {
    // O(n^2) approach - calculate height for each node
    public static boolean isBalanced(TreeNode root) {
        if (root == null) return true;
        
        int leftHeight = height(root.left);
        int rightHeight = height(root.right);
        
        return Math.abs(leftHeight - rightHeight) <= 1
            && isBalanced(root.left)
            && isBalanced(root.right);
    }
    
    private static int height(TreeNode node) {
        if (node == null) return 0;
        return 1 + Math.max(height(node.left), height(node.right));
    }
    
    // O(n) approach - bottom-up, single pass
    public static boolean isBalancedOptimal(TreeNode root) {
        return checkHeight(root) != -1;
    }
    
    private static int checkHeight(TreeNode node) {
        if (node == null) return 0;
        
        int leftHeight = checkHeight(node.left);
        if (leftHeight == -1) return -1; // Left subtree unbalanced
        
        int rightHeight = checkHeight(node.right);
        if (rightHeight == -1) return -1; // Right subtree unbalanced
        
        if (Math.abs(leftHeight - rightHeight) > 1) {
            return -1; // Current node unbalanced
        }
        
        return 1 + Math.max(leftHeight, rightHeight);
    }
    
    public static void main(String[] args) {
        // Create balanced tree
        TreeNode root = new TreeNode(1);
        root.left = new TreeNode(2);
        root.right = new TreeNode(3);
        root.left.left = new TreeNode(4);
        root.left.right = new TreeNode(5);
        
        System.out.println("Is balanced: " + isBalancedOptimal(root)); // true
    }
}

Balanced Tree: Height difference between left and right subtrees ≤ 1 for all nodes.

Time Complexity:

  • Naive: O(n²)
  • Optimal: O(n)

Space Complexity: O(h) where h is height of tree

Q8: What is the difference between HashMap and Hashtable?

HashMap:

HashMap<Integer, String> map = new HashMap<>();
map.put(null, "value"); // Allowed
map.put(1, null); // Allowed
  • Not thread-safe
  • Better performance for single-threaded use
  • Allows null

Hashtable:

Hashtable<Integer, String> table = new Hashtable<>();
// table.put(null, "value"); // NullPointerException
  • Thread-safe but slow
  • Doesn't allow null
  • Legacy class

Thread-safe alternatives:

  • ConcurrentHashMap: Better concurrent performance
  • Collections.synchronizedMap(): Wrapper for HashMap

Recommendation: Use HashMap for single-threaded, ConcurrentHashMap for multi-threaded. Avoid Hashtable in new code."

Q9: Write a program to implement merge sort.

public class MergeSort {
    public static void mergeSort(int[] arr, int left, int right) {
        if (left < right) {
            int mid = left + (right - left) / 2;
            
            // Sort first and second halves
            mergeSort(arr, left, mid);
            mergeSort(arr, mid + 1, right);
            
            // Merge the sorted halves
            merge(arr, left, mid, right);
        }
    }
    
    private static void merge(int[] arr, int left, int mid, int right) {
        // Sizes of two subarrays
        int n1 = mid - left + 1;
        int n2 = right - mid;
        
        // Temporary arrays
        int[] leftArr = new int[n1];
        int[] rightArr = new int[n2];
        
        // Copy data to temp arrays
        for (int i = 0; i < n1; i++)
            leftArr[i] = arr[left + i];
        for (int j = 0; j < n2; j++)
            rightArr[j] = arr[mid + 1 + j];
        
        // Merge temp arrays
        int i = 0, j = 0, k = left;
        while (i < n1 && j < n2) {
            if (leftArr[i] <= rightArr[j]) {
                arr[k] = leftArr[i];
                i++;
            } else {
                arr[k] = rightArr[j];
                j++;
            }
            k++;
        }
        
        // Copy remaining elements
        while (i < n1) {
            arr[k] = leftArr[i];
            i++;
            k++;
        }
        while (j < n2) {
            arr[k] = rightArr[j];
            j++;
            k++;
        }
    }
    
    public static void main(String[] args) {
        int[] arr = {12, 11, 13, 5, 6, 7};
        System.out.println("Original: " + java.util.Arrays.toString(arr));
        
        mergeSort(arr, 0, arr.length - 1);
        
        System.out.println("Sorted: " + java.util.Arrays.toString(arr));
    }
}

Time Complexity: O(n log n) - all cases Space Complexity: O(n) - temporary arrays

Advantages: Stable sort, predictable performance, good for linked lists Disadvantages: Requires extra space

Q10: Explain the SOLID principles.

S - Single Responsibility Principle (SRP): A class should have only one reason to change.

// Bad: Handles user data, validation, and database
class UserManager { }

// Good: Separate concerns
class UserService { }     // Business logic
class UserValidator { }   // Validation
class UserRepository { }  // Data access

O - Open/Closed Principle (OCP): Open for extension, closed for modification.

// Use interfaces/abstract classes
interface PaymentProcessor {
    void process();
}

class CreditCardProcessor implements PaymentProcessor { }
class PayPalProcessor implements PaymentProcessor { }
// Add new processors without modifying existing code

L - Liskov Substitution Principle (LSP): Subtypes must be substitutable for their base types.

// Square should not extend Rectangle if it changes behavior
// Behavior must remain consistent

I - Interface Segregation Principle (ISP): Clients shouldn't depend on interfaces they don't use.

// Bad: One large interface
// Good: Split into specific interfaces
interface Printer { void print(); }
interface Scanner { void scan(); }
// Implement only what you need

D - Dependency Inversion Principle (DIP): Depend on abstractions, not concretions.

// Bad: DatabaseService depends on MySQLConnection
// Good: DatabaseService depends on Connection interface

Benefits: Maintainability, testability, scalability, reduced coupling."


Managerial/Behavioral Questions with Answers

Q1: How would you handle a situation where you disagree with your manager's technical decision?

Q2: Describe a time you had to influence without authority.

Q3: How do you ensure code quality in your work?

Q4: Tell me about a time you failed to meet expectations.

Q5: How would you approach a project with unclear requirements?


Tips for Cracking IBM Interview

  1. IPAT Preparation: IBM's cognitive assessment is challenging. Practice pattern recognition, number series, and logical reasoning extensively. Time management is crucial.

  2. Know IBM's Transformation: Understand IBM's shift to hybrid cloud and AI. Research watsonx, Red Hat acquisition, and current strategic focus areas.

  3. Coding Fundamentals: Be strong in data structures, algorithms, and problem-solving. IBM values strong computer science fundamentals.

  4. Patents and Innovation: IBM values innovation. If you have any innovative projects or ideas, be ready to discuss them.

  5. English Proficiency: The English language test is important. Practice grammar, reading comprehension, and listening skills.

  6. Open Source Contribution: IBM is active in open source. Any contributions to open source projects are worth mentioning.

  7. Quantum Computing Awareness: Basic awareness of IBM's quantum computing initiatives shows genuine interest in the company's cutting-edge work.

  8. Research Culture: IBM has a strong research heritage. Show appreciation for research-backed innovation and continuous learning.

  9. Ethics in AI: IBM emphasizes responsible AI. Be aware of AI ethics discussions and IBM's principles for trust and transparency.

  10. Behavioral Preparation: Use STAR method for behavioral questions. IBM values examples of innovation, collaboration, and client focus.


Frequently Asked Questions (FAQs)

Q1: What is the fresher salary at IBM? A: Typically ranges from 4.5 LPA to 7 LPA depending on the role (Software Developer, Associate System Engineer) and performance in assessments.

Q2: Is the IPAT test difficult? A: IPAT is considered challenging, especially the number series section. Practice extensively with sample questions and focus on pattern recognition.

Q3: Does IBM have a bond period? A: Typically no formal bond, but check specific offer letter terms. IBM generally doesn't require service agreements for freshers.

Q4: What programming languages should I know for IBM? A: Java is most commonly used. Also be comfortable with Python, C++, or JavaScript. Strong fundamentals matter more than specific languages.

Q5: What is IBM's work culture like? A: IBM values innovation, diversity, and inclusion. The culture emphasizes continuous learning, work-life balance, and ethical business practices.


Best of luck with your IBM interview preparation!

Advertisement Placement

Explore this topic cluster

More resources in Interview Questions

Use the category hub to browse similar questions, exam patterns, salary guides, and preparation resources related to this topic.

More in Interview Questions

More from PapersAdda

Share this article: