Concentric AI OA 2026 | 3 Questions | LC 1051 + Weighted Median + Bitwise OR DP

concentric ai logo
concentric ai
August 9, 2026 · 0 reads

Summary

I completed the Concentric AI online assessment, which featured three coding problems of increasing difficulty, and I am sharing the details for future candidates.

Full Experience

Concentric AI OA 2026 | 3 Coding Questions | Easy, Medium, Hard

Recently I gave the Concentric AI Online Assessment, which had 3 coding questions of increasing difficulty.

Q1. Students Not in Correct Position — Easy

An array representing students' heights/positions was given.

We had to arrange the array in ascending order and count how many students were not standing at their original index after sorting.

Example idea:

arr = [1, 1, 4, 2, 1, 3]

Compare the original array with its sorted version and count the mismatched positions.

This was essentially:

LeetCode 1051 — Height Checker

Topics: Sorting, Arrays


Q2. Minimum Travel Cost — Medium

We were given three arrays:

  • numPeople[]
  • X[]
  • Y[]

numPeople[i] represents the number of people at coordinate (X[i], Y[i]).

We had to select an optimal coordinate (x, y) such that the total Manhattan travel cost of all people was minimum.

The cost for a location was:

Σ numPeople[i] * (|x - X[i]| + |y - Y[i]|)

Example:

numPeople = [1, 2]
X = [1, 3]
Y = [1, 3]

Choosing (3,3) gives:

1 * (|3-1| + |3-1|) + 2 * (|3-3| + |3-3|) = 4

So the minimum cost is 4.

This is a Weighted Manhattan Median / Weighted Median problem.

A very similar problem is:

HackerRank — Metro Land

Closest LeetCode-style problem:

LeetCode 296 — Best Meeting Point

The main idea is to find the weighted median independently for X and Y coordinates.

Topics: Weighted Median, Greedy, Sorting, Manhattan Distance


Q3. Maximum Profit with Bitwise OR Constraint — Hard

We were given:

  • Integer N
  • Integer K
  • Array A[]
  • Array B[]

We had to choose a subset of indices such that:

A[i1] | A[i2] | A[i3] | ... <= K

and maximize:

B[i1] + B[i2] + B[i3] + ...

In other words, we needed to select elements from A, take their bitwise OR, ensure the result was <= K, and maximize the sum of their corresponding values from B.

This problem is available in similar form as:

Maximizing Profits using Bitwise OR / Bit Profit

The same problem sometimes uses names like:

  • indicators[] instead of A[]
  • profit[] instead of B[]

Topics: Bit Manipulation, Dynamic Programming, Bitmask, Optimization


Overall difficulty:

Q1: Easy Q2: Medium Q3: Medium-Hard / Hard

The OA had a good progression from a basic sorting problem to weighted optimization and finally a bitwise OR optimization problem.

Hope this helps anyone preparing for the Concentric AI OA / Software Engineer interview process in 2026.

Interview Questions (3)

1.

Height Checker

Data Structures & Algorithms·Easy

Given an array of student heights, sort the array in ascending order and count how many students are not in the same index as they were in the original array.

Input: arr = [1, 1, 4, 2, 1, 3]

Output: Number of mismatched positions after sorting.

This corresponds to LeetCode 1051.

2.

Minimum Travel Cost (Weighted Manhattan Median)

Data Structures & Algorithms·Medium

Given three arrays numPeople[], X[], and Y[] where numPeople[i] is the number of people at coordinate (X[i], Y[i]), choose a meeting point (x, y) that minimizes the total Manhattan travel cost:

Σ numPeople[i] * (|x - X[i]| + |y - Y[i]|).

Example:

numPeople = [1, 2], X = [1, 3], Y = [1, 3]

Choosing (3,3) yields a cost of 4, which is minimal.

The solution involves finding the weighted median separately for the X and Y coordinates.

3.

Maximum Profit with Bitwise OR Constraint

Data Structures & Algorithms·Hard

Given integers N and K, and two arrays A[] and B[], select a subset of indices such that the bitwise OR of the selected A values is less than or equal to K, and the sum of the corresponding B values is maximized.

Formally, find a subset S of indices where: OR_{i in S} A[i] <= K

Maximize: Σ_{i in S} B[i].

The problem requires a combination of bitmask dynamic programming and greedy strategies to respect the OR constraint while maximizing profit.

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!