Full Transcript

·YouTLDR

誠徵資深實習生|面試過程公開

20:15EnglishTranscribed Jul 28, 2026
0:08

Hello everyone, I'm Terry. As you all know, the North American tech industry is in a bad shape. So I fired all the engineers in my company. Mainly because I'm in charge of the paid subscription of ChatGPT. But I found out that ChatGPT is better to use for typing and speaking. So I decided to hire a senior intern today. By the way, let me show you a real record of the position of our company's new first-tier company. The real interview topic of North America's new first-tier company is very public.

0:39

OK Hello Nick, my name is Terry Let me tell you about our interview process At first, it took about a minute to introduce myself

0:49

然后我们今天面试的目标主要还是考一题技术上面的问题,主要还是以coding为主。 可能如果有时间的话我们会再做一个延伸,这样子的安排有什么问题吗? 这样安排没有问题。 那可以稍微自我介绍一下,讲一下你的经验,或是你之前工作的团队,或是你的公司。

1:09

Hello, I'm Nick. I have about 5 years of experience in software development. I've been managing the company for 2 years. I'm currently the technical director of the virtual currency exchange. I have 5 teams, including my backend from NRAP. My backend is divided into 2 teams. I usually manage the staff.

1:28

I haven't touched the technical part for a while, but my main technical stack is mainly Ruby, JavaScript, and Golang. Ruby is more familiar. This is my current status. I have brought some teams to run some cases, from small to big or international. I have these experiences to apply for the position of Senior Intern today. Do you have a girlfriend?

1:57

結婚了嗎? 有女朋友打算要結婚 打算要結婚是嗎? 對 因為我們招的這個職位是 Senior Intern 所以我們是希望有至少10年的工作經驗 或是單身可以加班那種 那我覺得加班的部分我是沒問題 可是我的經驗還差一小段 因為我剛剛前面講說我大概只有7年 所以10年我盡可能用加班這段去補足 可以啦我就OK了 對 雖然可能

2:25

Anyways, I'll send you a link to the CoderPad.

2:51

Okay, so for today's topic, you can see a graph here.

2:56

There are several nodes in it, 1, 2, 3, 4, 5, 6, 7. Now we want you to implement the function called search graph. That is to say, you have to traverse this graph once. Then from 1, every time you traverse to a node, you have to print the number of nodes. Then the order you print is based on the distance from 1. I'll give you an example. For this picture, you start with 1.

3:21

1 will give you the neighbor's number. So the next one you need to print is 234. 234 is the number of nodes. Because the distance between them is 1. So it doesn't matter how you print 234. You can print 324 or 423. The point is the order of your print should be the same as the distance between them. You will print 1, 234 or 324. The next one is

3:47

5 and 6. 5 and 6 are the next neighbors of 2 and 3. And the last one is print 7. And the function of this search graph is to print the last order. Okay, let me confirm that I understand the correctness of this topic. So I just need to know that, for example, I start from 1. Then 234 is 1. Then I don't have to care about the order I want to print. Including 324, 432, etc.

4:14

But if it's the closest to its node, then 567 or 765 are fine. No need to care about the number size. Right? It can't be 765. It should be 567 or 657. Because the distance from 7 to 1 is 3. I understand. And you can assume that there will always be 1. And start from 1. So the function of this search graph, I've already written it here. The starting point is 1.

4:36

And then there's a fetch neighbors function here. This function is basically an API call. It will communicate with this API endpoint using Excel and pass the number of nodes into it. And then this API endpoint will return all your neighbors. And then for example, for example, if you pass 1 in today, it will return 2, 3, 4. If you pass 2 in, it will return 1 and 5. Okay, you can see this code here. I'm 1 now. If it's 1, its neighbor will print out 2, 3, 4. It's an array of neighbors. Okay.

5:02

Okay, let me think. Can I have some time to think? Maybe 30 seconds. Sure, you can think about it. But not too long. Okay. I want to make sure that I won't run back and forth. I will record the basic node first. So I will make a... I will make a array. This array will record the nodes that I have run past. And I need to think about something to make sure that I can get the node back. And then find the node distance. I want to do that.

5:28

So this neighbors should be the result of our API and the data is 234. So this 234 should be stored in a place I ran, like a Null List. Or a Null List. Okay, so the next space I want to imagine is in the running JoeFoxInVisit. And then queue. I want to design a queue. I want to design a queue that keeps running. And then I might have to pull something out of that queue. Why do you want to use queue? Why do I want to use queue? At first, I was thinking about stack or queue. But if you want to use stack,

5:56

If I use a stack, the order will be the same as I imagined.

6:00

not the same because it will start counting from the back, right? Let me confirm. Can I Google check it? Because I forgot the difference. You can Google it a little bit. I think it can't be too much. Okay. Because if it's like this, I didn't remember it wrong. It should be Stake and Q. Stake is the last step. So the last step I came in, for example, 1, 2, 3, 4, 5, 6, 7. The last step of 7 comes in first. Then the order may not be as expected. Yes, so it should be. If you think about it like this, the way Q comes in first should be

6:28

It's a bit reasonable, it will meet our expectations. But I haven't done it yet. I'm thinking about it in my head. I may have to do the queue first. I may have to do the visit and queue mechanism first. Because this is the last scene. Yes, I may need to do the coding first. Yes, I have to do the queue. Then visit. Then my maverick needs to pull this scene back. After that, it will be done. Push, push, start. Then you can click the start. Then queue. In this time, it's the real game.

6:54

So I can understand that this is actually a depth-based algorithm. Terry, can you understand this? I think so. I haven't written it in a long time. Almost. Why don't you write it first? Okay, I'll write it first. I need a length. The length is Q.

7:21

Oh, I wrote it wrong. I shouldn't have used array. I should know which one is already

7:44

I imagine that there is something that looks like this. Suppose 1 has been verified. Then 2 is not. Right? Wait a minute. So you want to use a set, right? Yes, if I use a set, it will meet my expectations. Where is the difference between set and array?

7:59

For send, it's basically a hash. It's just a hash. I forgot. Because there's the same thing in Ruby. Array is just a array. It's a collection of elements. So it can't know that... If I put 1, 2, 3, 4, 5 in an array, I'm not sure if I put 1. It can't change the attribute. So I can use hash to match. Okay. I imagine it like this. If I put an item in it, let me see. So... I might have to...

8:27

I will use this to show the N data. So I can see the data that the node has been pulled out. Then I can go to my query to determine. I imagine there will be a loop. I will pull out the Nevers. For example, after pulling out the 234, I will let it run in the query. Then you have to put the nodes you have seen into it. Wait a minute.

8:59

The naming part is very important, otherwise people might not understand. I'm afraid other people might not understand. I'll have to fix my way of doing this. Oh, wait, why not? Why did I do something wrong? I want to laugh. But I think neighbors are not something that can be used in 4-H. The neighbors.data is the array you want to find. Yes, I forgot to write it in the controller. So we should do this.

9:32

Oh, so now I can make sure that I've added all the neighborhood nodes to the list I've already seen. Next, I'll make the queue mechanism. It seems that the reason why it accidentally caused this infinite loop is that this editor shouldn't be spoiled by us. No problem, just write it down. You need to run it again and press run again. Okay, got it. I think I ran out of this infinite loop because

9:58

因為我雖然有把visit放進去,但是我沒有去檢查。 所以我應該要有一個,如果他never site visit裡面的話,就不能做。 所以要是不存在的才可以做。 這樣子的話,我還是只跑出第一個。

10:21

So it means that according to the chart I just saw, I saw 1 and 2, 3, 4, and 5, 6, 7 nodes are missing. So I must have a... Oh, I missed a node. If the node is missing, it means that I have to put in the same number. So I might have to start with 1. 1 is start. After start,

10:38

I was starting with "Start" and then after changing the loop, I realized that this shouldn't be "Start" It should be the icon we just placed. Wait a second. Oh, this is because I'm looking at the content of the queue. So I should be right in order. Because it appears at the distance of the node. 1, 2, 3, 4, 5, 6, 7, 8.

11:04

OK.

11:21

OK, that seems to be right. If you are implementing this function today, if this is in production, you are writing this code today, how will you test the accuracy of this code? The accuracy of the code? OK, we may have the initial idea. It must be manual. We just want to say that it is the same as running this run. After testing, it is the same as the original expected output. The more efficient way should be in

11:44

we can use the automated method or write it into a unit test. Then I can test the unit test function to see if it is as expected every time. In my personal opinion, the design method will be that I start with the happy case, for example, 1234567 is what we expected. But we can also accept the above answer,

12:07

Okay.

12:25

OK, I understand. We still have some time. Let me make a little extension. Now, because every time we get this neighbor, we call an API call, right? Call an API call with this endpoint. If you run this, you can see that it returns the neighbor array from one second to one second. So how much is its runtime for implementation?

12:46

如果假設一個一秒的話,我跑完這七個就是七秒嗎? 就是這樣假設啊。 如果是用Big O的話,你會怎麼去notate這個runtime? Big O,可惡,忘記Big O是什麼了。 如果你有N number of node,有N個node的話,它的runtime是? 就是logN對不對? 意思就是說它會隨著時間複雜度,因為你的原本的數量, 然後你的時間複雜度會乘以那個數量。 可是我現在想不起來那個要怎麼稱呼。

13:12

沒關係,相對來講沒關係。 就像你剛剛講的嘛, 假如每一次我們API code要花一秒鐘的時間, 然後我們要跑完所有的node, 用這個example的話, 我們要大概花七秒的時間對吧? 對。 有沒有什麼辦法你可以讓它變更快一點? 變更快一點嗎? 變更快一點...

13:29

因為我們不能去控制, 我們無法控制API回應的速度嘛, 那我想這樣的方式是把它拆掉, 因為它現在是有點像是blocking的狀態, 就是我今天必須得等A做完再做B, B做完再做C, 那如果以JavaScript常用的方式, 就是我們想辦法把它做成非同步的方式下去做, 就是我今天就是把,

13:50

I imagined it like this.

14:18

比較具體來說可能會把Await這一個改成非同步的方式去做, 可能Synchronize的方式去做, 我想像是這樣啦。

14:27

So if you do it like this, can you explain how your code runs? Using this example. Okay. Because I just thought of a point in the process. I will directly un-tune all the times today. It's very likely to lose control. I can't know. I may have to wait for the results to come back. I can't be sure that I know the correctness. Because I may need to group this up.

14:53

I imagined that I could make a group based on the node distance and let them send it once and then come back again. I remember there was a way to do it in the past, but I'm not sure if there was a way to make a group based on one node.

15:10

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

15:36

Right.

15:44

二三四可能他回來, 他回來接點如果是二三四, 我就讓這二三四變成一個group, 然後再讓他往下發送, 就變成是二三跟四都fish neighbors 在同一個時間, 然後再回來我就可以去整理我的visit跟queue的結果, 然後再往下做下一步, 這樣子等於是每一個節點的訪問速度都會再更快,

16:06

嗯。

16:21

Okay, so that's it for today's interview. We're almost done. So, after the interview, will we have any further notice? Because I want to express that I really want to do this job, because the management is really tired. Oh, yes, if we have the next step, we will notify you again. But maybe not, but if there is, we will notify you. Okay, okay.

16:47

So

16:54

I don't want to introduce myself. I want to introduce myself. It's up to you. What is this part? Is this part of my introduction to your channel? What do you think about the interview? What do you think about the interview? I'm interviewing. To be honest, if it's a legal issue, it's always the most unfamiliar place for me. Plus, I don't want to say that I'm born to be a bad lawyer. But...

17:18

I think it's partly because of my position. My position is mainly because I've been in management for almost two years. To be honest, I really don't have much time to code. I have a lot of time to code. I help my colleagues to see the code review or my side project after work. But my side project is rarely written. So for me, I think the interview just now is still...

17:37

I think it's a good idea. I think it's better to have some thoughts or something. Because if I prepare the topic first, maybe it can be a little smoother. So I don't know what Terry thinks. I think it's okay. I know if I haven't written a quote for a long time or start to do management, the writing skills will become weaker and more obvious. And I think your performance just now is pretty good. I think at least it's better than I thought.

18:05

-

18:29

中文字幕 by 蕭若龍

18:50

I will share my personal experience and cases to help you guys. I will also answer some online questions in this course. The content of the course will mainly be divided into several chapters. We will talk about the part of increasing salary and income growth. And when you encounter a water-shed, you may have to choose the direction of skill development. And how to do it at this time. And even improve professionalism and increase learning efficiency. Can make you more productive and more efficient to finish the thing. And then...

19:19

Yes, we need to build up our personal assets. Lastly, there may be some problems with the management of the forwarding position. Some people may encounter it, some may not.

19:29

We will talk about it in the video. Next, we will talk about the transition part, including cross-area or transition route success cases. I have brought some engineers to succeed in transition. These cases will be posted in the course. We will share them with you in more detail. Is there any advantage in this course? Is this a advantage in the course? Since it is on Terry's channel, we must give Terry this face. After all, this question has been asked. So we think there will be a 700-dollar discount. Usually, there are 300-500 on all four sides. We hope that 700 will give you a discount.

19:57

-

More transcripts

Explore other videos transcribed with YouTLDR.

Get the TLDR of any YouTube video

Transcribe, summarize, and repurpose videos in 125+ languages — free, no signup required.

Try YouTLDR Free