貢獻者: 布惠寫, koala
影片
題目挑選
光從題目挑選就碰到了不少問題,原則上要挑選的題目都要做過一遍
而且最好能夠有改進方法,否則錄製起來影片會只有簡單的一個段落.
不過最後來是選了自己有做過但是沒有更近一步改進的題目(之後再做改進)
目前挑選以下三題
- 268. Missing Number
- 104. Maximum Depth of Binary Tree
- Combination Sum
檢討
當面試官的問題
- 對於能掌握的題目太少所以無法提出很好的問題
- 因為如果面試者答不出來就沒辦法錄製,所以也沒辦法問太深入的問題
面試者的問題
準備期
- 題目寫的太少 -> 能夠錄影的題型很少 -> 面試時能夠處理的題目也不夠
- 錄影寫程式碼,如果寫的很慢會變得很難錄製,其實也可以說如果寫的很慢會導致面試不順暢,所以要在錄製前花很多時間去練習.
- 如果用 recursive 的方式解決,也有可能會被問 loop 的解法 (ex: Tree)
- 用 stack 去紀錄 recursive 的經過
面試過程
- 太急著去寫程式碼,應該要跟考官確認方案,並且指出時間還有空間複雜度
- 寫一寫會忘記看是否有 syntax error
- 英文的部分很常用 We,但是要改成 I 會比較好。因為是自己在解題
- 需考慮完全寫不出來的時候
面試後感想
一個 interview 剪完大概有 16 分鐘,包含額外問題的部分.
但是真實面試解題時間可能會更長,所以一個面試可能會被問個 2 ~ 3 個額外題目.
268. Missing Number
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 解釋題目
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 舉例確認是否有誤
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 確認舉例無誤
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 解釋解法
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 提出 sort 問題 : 因為 1. 這邊無法使用 python default 的 lib
重新寫一份時間會太長,是否有辦法有快速寫一個複雜度相等的 sort ?
這題目其實是有不用 sort 的解法的
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 提出解法 -> 帶入例子驗證
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 確認解法可行
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 實際實作
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 提出延伸題目 single number
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 提出是否會有沒有 sigle one 的狀況 ?
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 既然題目都有說會有一個數字是 single num, 先不考慮這樣的情形
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 提出 xor 解
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 聽起來可行,可否嘗試撰寫程式碼
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 撰寫程式並且驗證
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 目前看起來沒有太大的問題,那時間也差不多了感謝參加這次的面試,我們會另行通知結果104. Maximum Depth of Binary Tree
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 解釋題目
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 解釋解法
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 確認解法是否有誤
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 撰寫程式
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 提出問題 -> 如果改搜尋 mimum depth 呢 ?
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 提出解法
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 確認解法是否有誤
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 解釋問題並改進 -> 帶入例子驗證
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 有沒有辦法讓他更快呢 ?
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 因為是 min 和 binary 的關係,不用執行整棵樹就可以知道結果,當跑完左子樹時就可以得到一個高度,然後當跑右子樹發現高到大於左子樹,就可以直接 return 答案
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 聽起來可行,可以改進程式碼或驗證呢 ?
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 改進程式碼或者驗證細節
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
: 目前看起來沒有太大的問題,那時間也差不多了感謝參加這次的面試,我們會另行通知結果第三週影片重點
- 延伸題可以考慮選 medium 的題目來增加難度
- 練習時可以思考 leetcode 上面的限制,然後在面試時問出來,如果 interviewer 沒有表示細節
- 因為補習班的關係,interviewer 沒辦法直接照唸題目,否則補習班訓練的 interviewee 會馬上想到解法
- 可以評估 REACTO 每個步驟的時間 (reac 在 8 分鐘內解決),看看是否有辦法最佳化
- 怎麼短時間去驗證程式
- 有可能會碰到眼睛有問題的 interviewer, 可以用聽看看影片是否能夠聽得懂解說
- 再延伸題的時候只需要把 approach 說出來就可以,避免花太長的時間
- 關鍵在互動!互動!互動!
Reference