Yahoo OA 全解析|Yahoo OA 面試流程 + 高頻題目類型詳解【附準備建議】

1,162Views
尚無留言
Yahoo OA 全解析|Yahoo OA 面試流程 + 高頻題目類型詳解【附準備建議】

近年來,Yahoo 雖不再是炙手可熱的互聯網巨頭,但它在搜索、金融、媒體等領域仍然擁有穩定的用戶基礎,也持續在全球招收優秀的工程與數據人才。 尤其是 Yahoo SDE 新人崗、Intern 崗,每年都吸引不少申請者,在線筆試是入門的第一關。 我們整理了 2025 屆 Yahoo OA 的兩道代表性題目,涵蓋典型的字串演算法與貪心策略,在實測中算是“中等偏上”的難度,適合準備 FAANG 同級別筆試的同學練手。 以下是完整題目、拆解思路及經驗分享。

Question 1: Count Binary Substrings

Problem Description

You are given a binary string s containing only characters '0' and '1'. Your task is to count the number of non-empty substrings that have the following properties:

  1. The number of 0s and 1s in the substring are equal.
  2. All the 0s and all the 1s in the substring are grouped consecutively. That is, it must look like '000111' or '11', but not '0101'.

Note that substrings can overlap, and duplicates should be counted.

Example:

Input: s = "011001"
Output: 4
Explanation: Valid substrings are "01", "10", "1100", and "01" (at the end).

Question 2: Remove Duplicates for Lexicographically Largest Result

Problem Description

You’re given a string input_str consisting of lowercase letters. You may remove any duplicate character to make the string consist of unique characters only.

Your goal is to return the lexicographically largest possible result string after such removals.

You may perform the removals in any order, and must ensure that each character appears at most once in the final output.

Example:

Input: input_str = "aabcb"
Output: "acb"
Explanation:
We remove the first 'a' and the first 'b'. Among all strings with unique characters, "acb" is lexicographically the largest.

實戰體驗分享|Yahoo OA 做題節奏

這次我們輔導的學員在參加 Yahoo OA 時,反饋整體介面偏 HackerRank 風格,測試時間約 90 分鐘,兩道題都需要自己寫函數體,程式設計語言支援 Java / Python / C++ 等主流語言。 雖然題目本身不是很難,但需要極強的細節處理能力,否則容易在邊界 case 上丟分。

題目雖然沒有強調時空複雜度要求,但在最後 10% 提交者中拼的是優化細節,建議練習中直接寫 O(n) 的方法,確保可以 AC 所有 test case。

Programhelp 獨家協助|遠端連線 + 語音提示 + 快速定位

如果你也在準備 Yahoo、Citadel、Amazon 等頂尖公司的 OA,歡迎使用我們的【Programhelp 遠端無痕連線協助服務】。 我們通過專屬 Chrome 外掛程式 + 螢幕控制 + AI 語音即時提醒,説明你:

  • 快速理解題意、避開坑點;
  • 定位 bug 與邏輯盲區;
  • 提前準備高頻題範本,現場直接套用。

无论你是算法不熟、英语读题慢,还是心态容易慌,我们都能根据你的节奏匹配不同等级的远程助攻,真正做到“无痕辅助 + 高分交卷”。

已經有超過 500 位同學通過我們的系統,順利拿下位元組、Meta、Salesforce 等一線 tech offer。

author avatar
azn7u2@gmail.com
END
 0
Comment(尚無留言)