貢獻者:塔塔 - Jennifer
👨🏻🏫:interviewer
🐣:interviewee
影片連結:
英影片1
👨🏻🏫:Hello, welcome to today’s interview. I’m Will, a software engineer. Nice to meet you.
🐣:Nice to meet you too. I’m Jennifer, a new graduate from National Cheng Kung University.
👨🏻🏫:Okay, let’s start our discussion. I have seen your CV, and you said that you have done a project about predicting the price of the stock.
🐣:Yes. The project is predicting the price by using machine learning skills.
👨🏻🏫:Sounds interesting. We can discuss the project later. Now I have a question, how to find the best time to buy and sell stock if you have several data present as the price of stock?
🐣:First, we have to find the lower number and buy the stock on that day.
Next, we have to find the highest number at the remaining data. The difference is our profit. If we can’t find the higher number in the remaining data then we return zero.
🐣:And because the price can only be positive numbers, so there might be no boundary conditions.
👨🏻🏫:It sounds reasonable.
🐣 : Ok, I would like to start with a direct solution. (Open doc)
🐣:And the time complexity is O(n^2), space complexity is O(1)
👨🏻🏫:I think there is another way to reduce time complexity, can you try it?
🐣:Umm, I think dynamic programming will be a better solution.
👨🏻🏫:That’s right. Go ahead for it.
👨🏻🏫:Okay, and that’s the end of the coding interview. Hope you have a nice day.
🐣:Thank you for your time, have a nice day!
這次作業參考了其他同學在作業一使用的面談技巧,也統整出我自己覺得萬用的應答及coding interview時應注意的事項
1:59 sth comes to one's mind用法不錯。
2:37 because重複太多次。可改用as / since / owing to / due to / on account of / as a result of 等等。
2:43 2:54 3:10 注意會一直出現 so. umm, or and。時間為舉例。
6:06 沒說要initialize什麼。
7:36 "a" solution, not "an"
11:04 這裡說出 "this's the one of the solutions" 直接說出你想了兩種作法(或更多),然後故意藏招不說出最好的。正常來說,你不應該把這種事情說出來。
11:33 Time complexity you could say "Big O of n to represent O(n) rather than speaking just 'n'."