美國各大公司 Online Assessment 整理 2022
這邊紀錄自己寫過的OA題目、參考資料、還有解題詳解。有些題目不一定有跟LeetCode完全一樣,盡量整理出來。
(PS: 有些題目詳解,LeetCode上都有就不會寫,或是當下尚未寫完,但會慢慢更新!)
參考網站: 一畝三分地 、LeetCode Discussion
TikTok —
stars and bars
LeetCode: 2055. Plates Between Candles
此題跟LeetCode題型差不多,差別在input 為 startIndex, endIndex => Array of int ,然後起始從1開始
circular printer
LeetCode: https://leetcode.com/discuss/interview-question/1263982/thomson-reuters-oa-circular-printer
能夠想到負號取餘數,這題幾乎秒解
解題:
ancestral names
LeetCode: https://leetcode.com/discuss/general-discussion/851939/ancestor-problem
這題難處在於如何轉羅馬數字,可以先去做leetCode: 13. Roman to Integer,對於羅馬數字熟悉後這題就好解了。
解題:
Max Inversion
LeetCode: https://leetcode.com/discuss/interview-question/777188/find-size-3-inversions-in-a-list
Shared interest
LeetCode: https://leetcode.com/discuss/interview-question/725801/amazon-shared-interest-problem
解題:
k smallest substring
Reaching points
LeetCode: 780. Reaching Points
Super Stack
preprocess date