CHUBB Coding Round Experience | 2026

Anonymous38m ago

I recently appeared for the CHUBB campus recruitment coding round for the Software Engineer / Technology Intern role.

The round was conducted on online assessment platform and consisted of 5 coding questions with a total duration of 2 hours.

Questions Asked

1. Minimum Flips to Make a Binary String Alternating

You are given a binary string s containing only 0s and 1s. Your task is to make the string alternating by flipping the minimum number of bits.

A binary string is called alternating if no two adjacent characters are the same. For example, 0101 and 1010 are alternating strings, whereas 0010 is not because its first two characters are the same.

In one operation, you can flip any single bit:

  • Change 0 to 1.

  • Change 1 to 0.

Find the minimum number of operations required to make the given string alternating.

Examples:

  • 0010 → 1 (flip the second character to get 0110? Instead, flipping the first character gives 1010, which is alternating.)

  • 0000 → 2 (one valid target is 0101)

  • 11010 → 1 (flip the first character to get 01010)

2. Minimize the Sum of Distinct Elements Across Prefixes

You are given an array containing duplicate elements. Rearrange its elements to minimize the sum of the number of distinct elements in every prefix of the array.

For example, consider the array:

3 3 1 2 2 4

One possible arrangement is:

3 3 2 2 1 4

The number of distinct elements in each prefix is:

1 1 2 2 3 4

The sum is 13. The goal is to find an arrangement that minimizes this sum by placing repeated elements as early as possible.

3. Minimum Cost to Repay Daily Bandwidth Usage

You are given an array representing daily bandwidth usage and a maximum transaction limit k.

The bandwidth usage corresponding to each day can be repaid either on the same day or on the following day, subject to the transaction limit. Find the minimum total transaction amount required to repay all the bandwidth usage, ensuring that nothing remains unpaid at the end.

I was able to pass some test cases but couldn't develop a complete solution.

4. Count Distinct Palindromic Substrings

Given a string s, find the total number of distinct substrings that are palindromes.

A palindrome is a string that reads the same forward and backward. A substring is a contiguous sequence of characters from the original string.

For example, for the string ababa, the distinct palindromic substrings are a, b, aba, bab, and ababa.

The answer is 5, since repeated occurrences of the same palindromic substring should be counted only once.

5. Find the Position of the Maximum Element After Array Rotations

You are given an array arr and a list of rotation values. Each rotation value specifies how many positions the original array should be rotated to the right.

For each rotation, determine the index of the maximum element in the resulting array.

For example, if arr = [1, 3, 2] and the array is rotated right by one position, it becomes [2, 1, 3]. The maximum element is 3, now at index 2 using zero-based indexing.

Return the index of the maximum element after each specified rotation.

My Result

I was able to solve the first two questions completely and pass some test cases for the third. I attempted the fourth and fifth questions as well, but couldn't get any accepted test cases.

Overall, the round was challenging and required identifying the right approach and optimizing the solution rather than relying on brute force.

Recommended Reads

Post

Improve problem solving ability

Guys, can anyone share how to approach Binary Search, Greedy, and Sliding Window problems? I can solve problems from Linked Lists to Dynamic Programming, but I

Post

5th Rejection in Campus Placements | 20 LPA CTC

I recently faced my fifth rejection during campus placements, and this one has been difficult to process. The interview process had two rounds: Technical Round

Interview Experience

Google L4 Interview Experience | DSA Round 1

The interview started with a graph problem and progressed through multiple follow-ups, each adding a new constraint. The focus was on problem-solving, optimizat

Interview Experience

SAP Labs Interview Experience | 1+ YOE | Selected

The recruitment process consisted of three rounds covering aptitude, computer science fundamentals, communication, and technical and HR discussions. Round 1: Ap

Interview Experience

Amazon SDE-1 Interview Experience | 1-2 YOE | Selected

I recently received an offer for the SDE-1 role at Amazon and wanted to share my interview experience with everyone preparing for similar opportunities. Here is

Comments0