Free beta: free to use with daily limits while we build. Join the waitlist for founding-member pricing at launch. Join the waitlist

Sign up free

BCG interview question

BCG online assessment: arrays and hashing

Company:
BCG
Round:
Online assessment
Type:
Coding
Difficulty:
Easy
Reported:
October 19, 2026

Problem

Study note: working with arrays

Short array questions in screening rounds mostly test careful indexing and a clear sense of cost. A hash map or set is the usual upgrade when a lookup by value would otherwise need a nested loop.

General approach

  • Write the loop bounds down explicitly and check them against the smallest inputs you can think of.
  • Use a hash map or set when you need to find elements by value rather than by position.
  • State the time and space cost before you start coding, then confirm it afterwards.

How to practise

Solve deduplication, frequency-count and pair-sum problems against a ten-minute timer each, and write the tests before the code.

Reported by candidates or drawn from publicly available sources, and rewritten in our own words. Pathwise Prep does not publish confidential assessment content. Report a concern