12 questions · from 2 interviews

Chubb interview questions

Every question candidates reported from their Chubb interviews, most frequently asked first. Each links to the write-up it came from, so you can see the round and how it went.

Chubb coding and DSA questions

  1. 01

    Minimize the Maximum Array Element

    Given an array, choose indices l, r and an offset i where 0 <= l < r < n and 0 <= i < r. You can perform the operation arr[l+r] = arr[l+i] & arr[r-i], where & denotes bitwise AND. Find the minimum possible value of the maximum element after performing the…

    From Chubb Interview Experience | Software Engineer | 2026

  2. 02

    Maximize Revenue from Selling Items

    A shop has n types of items, with their quantities given in an array. The price of an item equals its current remaining quantity. Given m customers, find the maximum revenue by selling one item to each customer.

    From Chubb Interview Experience | Software Engineer | 2026

  3. 03

    Minimize the Sum of Prefix Costs

    The cost of each array element is the number of distinct elements in the prefix ending at that position. You can rearrange the array into any permutation. Find the minimum possible sum of the costs.

    From Chubb Interview Experience | Software Engineer | 2026

  4. 04

    Count Valid Pairs

    Given an array and integers k and x, count pairs of indices (i, j) satisfying arr[i] <= arr[j], such that the interval [arr[i], arr[j]] contains exactly k elements divisible by x.

    From Chubb Interview Experience | Software Engineer | 2026

  5. 05

    Maximum Element After Rotations

    Given an array arr and an array rotate, find the index of the maximum element after performing the specified number of rotations for each query.

    From Chubb Interview Experience | Software Engineer | 2026

  6. 06

    Reverse a Linked List

    Given a singly linked list, reverse it in place.

    From Chubb Interview Experience | Software Engineer | 2026

  7. 07

    Find Unique Element in Array

    Given an array where every element appears twice except one, find the element that appears only once.

    From Chubb Interview Experience | Software Engineer | 2026

  8. 08

    Modified Knapsack (Powers of 2 Weights)

    You are given a cost array where the weight of the i-th element is strictly 2^i (0-indexed). You are also given a target minWeight. You can pick any element multiple times. Find the minimum total cost to achieve a combined weight of at least minWeight.…

    From CHUBB OA 2026 (Campus Placement)

  9. 09

    Sprint Training (Most Visited Marker)

    You are given N markers on a track (numbered 1 to N) and an array of sprints. Each adjacent pair in the sprints array represents the starting and ending points of a sprint (which can run forwards or backwards). Return the lowest numbered marker that is…

    From CHUBB OA 2026 (Campus Placement)

  10. 10

    JSON Diff

    You are given two fully stringified JSON objects representing flat key-value pairs. Parse both JSON strings and return a sorted list of all keys that are present in both JSONs but have different values. Example: - json1 = '{"name":"John", "age":"30",…

    From CHUBB OA 2026 (Campus Placement)

  11. 11

    Array Operations (Extract Last Element)

    You are given two arrays, current and desired (both contain the same elements). You can perform exactly one type of operation: extract the last element of the current array and insert it anywhere in the array. Find the minimum number of operations required to…

    From CHUBB OA 2026 (Campus Placement)

  12. 12

    Maximum Student-Teacher Distance

    There are N students sitting in a line at indices 0 to N - 1. You are given an array pos representing the indices where teachers are standing. For each teacher at index p, the teacher assigns a value of 0 to the student at index p. For all other students, the…

    From CHUBB OA 2026 (Campus Placement)

Chubb interview questions FAQ

What questions are asked in Chubb interviews?

Candidates reported 12 distinct questions across 2 Chubb interviews. 12 coding and DSA questions.