BCG Engineer OA 面經分享|Codesignal 四題全過,邏輯實現能力全面考察

9 月初的 BCG Engineer OA 又來了,這次分享一位學員的實戰經歷。
他是美本 Master 在讀,數據背景偏強(有過兩個 data internship),刷題基礎不錯,但對 Codesignal 環境和 OA 答題節奏不太熟。
在我們 Programhelp 的 mock 訓練后,順利通過四題,最後分數非常漂亮!

BCG 工程師 OA 概覽

平台:Codesignal
題量:4 道
題型分佈:陣列邏輯 + 哈希 + 矩陣處理 + 前置綴和
難度:⭐⭐⭐☆

Q1. Find Peaks in Array

Problem:
Given an array of integers, find all elements that are greater than both their left and right neighbors.
The first and last elements should always be included.

Idea:
Loop through the array from index 1 to n-2.
If arr[i] > arr[i-1] && arr[i] > arr[i+1], include it in the result.
Don’t forget to always add the first and last elements.
Time complexity: O(n).
Simple but requires careful boundary handling.

Q2. Book Sections Organizer

Problem:
You are given a list of operations:

  • switch section_name
  • add book_name

Each operation either switches to a new section or adds a book to the current one.
Return the section with the largest number of books at the end.

Idea:
Use a dictionary {section: set_of_books}.
Keep track of the current section while iterating through actions:

  • For add, insert the book into the current section’s set.
  • For switch, update the current section.
    Finally, return the section with the largest set size.
    Using a set prevents duplicates — a key detail!

Q3. Matrix Patching and Sorting

Problem:
You are given a large matrix divided into multiple 4×4 blocks.
For each block:

  1. Fill in the missing numbers (from 1 to 16).
  2. Sort blocks by the number of missing values.
  3. Reassemble the blocks into a new full matrix.

Idea:

  • Split the matrix into 4×4 blocks.
  • Count missing values for each block.
  • Fill them up and store (missing_count, block) in a list.
  • Sort by missing_count, then reassemble.
    The implementation is tedious but straightforward with nested loops or NumPy arrays.
    The test focuses on data manipulation and logic clarity rather than algorithmic difficulty.

Q4. Longest Subarray under Threshold

Problem:
Given an array and a threshold T, find the longest contiguous subarray satisfying a certain constraint based on sum and T.

Idea:
Using prefix sums, the condition can be transformed into an inequality:
P[l] ≥ (P[r+1] - T) / 2
Since all elements are non-negative, prefix sums are monotonic — enabling binary search to find the smallest valid l for each r.
Time complexity: O(n log n).
This problem tests mathematical reasoning and the ability to model inequalities.

Overall Impression

整套题目体现出 BCG 对“逻辑与实现能力”的重视。
不像纯 SDE 那样考算法复杂度,而是看你能否在 有限时间里写出清晰、可维护的代码。
矩阵分块和数据结构的应用比例很高,尤其容易暴露基础薄弱点。
整体难度中上,只要提前熟悉 Codesignal 输入输出规范,就能稳稳拿分。

BCG Engineer OA 常見問題

Q1:BCG Engineer OA 和傳統 SDE OA 有什麼區別?
A1:BCG 的 Engineer 更偏邏輯和實現,不卷演算法,而是看你的代碼表達清晰度與思路完整度。

Q2:題目難度在 Codesignal 屬於哪一檔?
A2:屬於中等偏上,Q3 和 Q4 的邏輯性較強,前兩題較基礎。

Q3:是否可以用 Python 解決全部題?
A3:完全可以,Python 在集合、矩陣操作上優勢明顯。

Q4:Programhelp 的 mock 是什麼形式?
A4:我們提供遠端無痕模擬實測,語音即時提醒 + 代碼邏輯檢查,確保正式答題時節奏穩定、不出錯。

Q5:BCG OA 通過後多久會出結果?
A5:一般 5–7 天內郵件通知,有時會安排後續 VO 或 case 面。

別再孤軍奮戰,讓專業助攻陪你闖過 OA 關

這位同學在正式測試前,通過 Programhelp 的一對一 mock 訓練,提前適應了 Codesignal 的題型和時間節奏。
正式考試時能快速進入狀態、準確判斷題意。

我們的核心助攻亮點包括:

遠端 mock 還原實測場景:提前熟悉 Codesignal 環境、輸入輸出格式與測試點邏輯;

即時語音提醒:遇到邏輯卡頓時能即時提示「檢查邊界」「換個維度理解題目」;

無痕連線輔助:全程穩定安全,平台檢測無異常,測試點 100% 通過。

很多 BCG、McKinsey、Bain 等諮詢類技術崗學員都通過類似的 mock + 實戰方案,順利拿下 offer。

author avatar
jor jor
END
 0