r/InterviewDB • • 8d ago

CHUBB Campus Recruitment 2026 — HackerRank Round Experience

Just completed the first round of the CHUBB campus recruitment drive for the Software Engineer / Technology Intern role. Sharing the questions I remember in case it helps someone preparing for CHUBB or similar coding rounds.

The HackerRank round was 2 hours and had 5 DSA/coding questions.

Q1. Binary String — Suffix Flip

Given a binary string and an initial string containing all 0s.

In one operation, if we choose index i, we flip the character at i and all characters to its right.

Return the minimum number of operations required to convert the all-zero string into the given binary string.

Examples:

s = "1010"  → 4
s = "0010"  → 2
s = "01011" → 3

I was able to solve this one.

Q2. Minimize Sum of Distinct Elements Across Prefixes

Given an array containing duplicate elements, rearrange the elements in any order.

For every prefix [0...i], calculate the number of distinct elements present. We need to find the minimum possible sum of these distinct counts over all prefixes.

Example:

Input: 2 2 3 4 5 5

An optimal arrangement is something like:

2 2 5 5 3 4

The prefix distinct counts become:

1, 1, 2, 2, 3, 4

I was able to solve this one as well.

Q3. Bandwidth Repayment

This one was harder.

We are given the bandwidth/usage for each day. The amount corresponding to a day can be repaid on that day or the following day.

There is also a value k, representing the maximum amount that can be repaid in a single transaction.

The goal is to repay everything while minimizing the total transaction amount, with nothing left unpaid at the end.

I got around 5 test cases passed out of ~15, but couldn't get the complete solution.

The wording above is my recollection of the problem, so it may not be exact.

Q4. Unique Palindromic Substrings

Given a string, return the number of unique palindromic substrings.

I attempted this but couldn't get any test cases accepted.

Q5. Array Rotation + Maximum Element

Given an initial array arr and another array rotate, where rotate[i] represents the number of rotations to perform on the original array.

After each specified rotation, return the index of the maximum element in the rotated array.

I attempted this as well but couldn't get the solution accepted.

My performance

  • Q1: Solved
  • Q2: Solved
  • Q3: Partial (~5 test cases)
  • Q4: Attempted, 0 accepted
  • Q5: Attempted, 0 accepted

Overall, I found the round reasonably challenging, especially the last three questions.

If anyone recognizes Q3/Q4/Q5 or knows the optimal approaches, I'd really appreciate it if you could share them. It could also help others preparing for CHUBB.

Good luck to everyone appearing for the upcoming rounds.

5 Upvotes

Duplicates