动画电影的幕后英雄怎么说好

Interviewing is a skill in and of itself. You can be the best developer in the world but you may still screw up an interview.

面试本身就是一种技能。 您可以成为世界上最好的开发人员,但您仍可能会搞砸面试。

How many times have you come out of an interview and wondered what did I do wrong? Why did they reject me?

您多少次走出面试,想知道我做错了什么? 他们为什么拒绝我?

As a candidate, it helps a lot to understand the expectations in an interview.

作为候选人,在面试中了解期望值会很有帮助。

In this article, I want to show every aspiring candidate the difference between a good and a bad interview and how it is perceived by the interviewer.

在这篇文章中,我想向每位有抱负的候选人展示一次好与坏面试之间的区别以及面试官如何看待它。

We will compare and contrast two different interviews and learn from each of them so that you can tweak your actions to match the expectations.

我们将比较和对比两个不同的采访,并从每个采访中学习,以便您可以调整自己的操作以符合期望。

第一次面试 (First Interview)

Let me take the same question above "Inverting a binary tree".

让我在“反转二叉树”上方进行同样的提问。

Interviewer (I): Hi, Welcome to our company. I am xxx doing yyy. So tell me about yourself.

访员(I) :您好,欢迎来到我们公司。 我正在做yyy。 请你介绍你自己。

Candidate (C) : I am xxx. I have about 5 years of experience in Backend development. I love solving technical problems.....

候选人(C) :我是xxx。 我在后端开发方面有大约5年的经验。 我喜欢解决技术问题。

I: That's great. So shall we move on to the problem-solving part?

:太好了。 那么,我们应该继续解决问题了吗?

C: Sure!

C :当然!

I: So you are given a binary tree. I want you to invert the binary tree and print the resulting tree.

:所以给你一棵二叉树。 我希望您反转二叉树并打印结果树。

C: (Thinking in the head) Hmmm Ok. A binary tree has two children. So I am assuming inverting means printing from leaf to root. So the easiest way to do that is to traverse the tree till the end and find the leaves...

C :( 脑子里想)嗯。 一棵二叉树有两个孩子。 所以我假设反转意味着从叶到根打印。 因此,最简单的方法是遍历树直到末端并找到叶子...

I: (After 5 mins of complete silence)  Do you understand the question? Do you need any clarification?

:( 完全沉默5分钟后)您明白这个问题了吗? 您需要澄清吗?

C: I am clear. Now I am just thinking of a way to print the nodes starting from the leaf.

C :我很清楚 。 现在,我只是想一种从叶子开始打印节点的方法。

I: What do you mean to print the nodes starting from the leaf?

I :从叶子开始打印节点是什么意思?

C: So basically I should print from leaf to root right? It is easy to traverse until the leaf. But the hard part is traversing back?

C :所以基本上我应该从叶到根打印正确吗? 遍历直到叶子很容易。 但是困难的部分正在回溯吗?

I: Hmmm. Are you sure you understand the question right? Inverting a tree means you should swap the left and right children.

:嗯。 您确定您理解的问题正确吗? 倒树意味着您应该交换左右孩子

C: Sorry I am not clear. When you said invert I assumed you meant printing from leaf to root.

C :对不起,我不清楚。 当您说反转时,我假设您的意思是从叶到根打印。

I: That's alright (This is where you lost the job). Now that you are clear let's proceed.

:没关系(这是您失业的地方) 。 现在您已经清楚了,让我们继续。

C: Yes I am clear. So now I have to swap the left and right nodes. That's easy right.(Writes code in silence)

C :是的,我很清楚。 因此,现在我必须交换左右节点。 这很容易。 (无声地写代码)

def invert(node)t = node.left node.left = node.rightnode.right = treturn node
end

C: I am done with the code.

C :我已经完成了代码。

I: Cool. So what have you done here?

:好酷。 那你在这里做了什么?

C: I have inverted the tree by swapping the left and right nodes. So I keep a temp variable to achieve the same.

C :我通过交换左右节点来倒置树。 因此,我保留一个临时变量来实现相同目的。

I: (Trying to nudge towards a proper solution) But this swaps only the root node right?

:( 试图推动一个适当的解决方案)但是这仅交换根节点,对吗?

C:(Puzzled) Hmm yes, so the left and right children will be inverted. That's the question right?

C :( 困惑)嗯,是的,所以左右两个孩子都会倒过来。 这是对的问题吗?

I: (Still there is no clarity in question) So the question is the complete tree should be inverted. Not just the root.

:( 仍然没有明确的问题),所以问题是完整的树应该倒置。 不只是根源。

C: Oh geez. So it is not just the root but the complete tree. Am I right?

C :哦,天哪。 因此,它不仅是根,而且是完整的树。 我对吗?

I: Yes that is correct.

:是的,这是正确的。

C: Ok. Let me think about it.

C :好的。 让我想想。

(After 2 mins)

(2分钟后)

C: I think I got it. So basically I need to do the same algorithm I wrote for the whole tree. Am I right?

C :我想我明白了。 因此,基本上我需要为整个树执行相同的算法。 我对吗?

I: Yes, but how do you do that?

:是的,但是你怎么做呢?

C: (Starts writing Code)

C :( 开始编写代码)

def invert(node)n = Node.new(node.val)invert(node.left)invert(node.right)n.left = node.rightn.right = node.leftreturn n
end

So I am guessing this should work.

所以我这应该工作。

I: Hmmm, let me see. (Finds the issue. Can you?) I am not sure if it works. Can you please run me through it?

:嗯,让我看看。 (找到问题。可以吗?)我不确定是否可行。 你能帮我解决吗?

C: Sure. First I am inverting the left subtree, then the right subtree and then I am swapping them so that root is inverted.

C :好的。 首先,我反转左子树,然后反转右子树,然后交换它们,以便反转根。

I: Hmmm. But the left and right nodes are returning new nodes after the swap right? You are still swapping the old nodes.

:嗯。 但是左节点和右节点在交换权之后会返回新节点吗? 您仍在交换旧节点。

C: I am not sure what you mean by that. I think this will work for all cases.

C :我不确定你的意思。 我认为这适用于所有情况。

I: Great man! We have run out of time. Thanks for your time, it was lovely talking to you. HR will get back to you.

:太好了! 我们时间用完了。 谢谢您的宝贵时间,很高兴与您交谈。 人力资源部将尽快与您联系。

反馈 (Feedback)

Now, what do you think was the final decision and what was the interviewer's feedback? The hypothetical feedback would be something along these lines:

现在,您认为最终决定是什么?访调员的反馈是什么? 假设的反馈将遵循以下原则:

  • The candidate assumed a lot of things and did not clarify the problem.候选人承担了很多事情,没有阐明问题。
  • The candidate came up with the approach out of nowhere and there was no proper reasoning behind the approach taken. (Remember the silence in the interview?)候选人无所适从地提出了该方法,所采取的方法背后没有适当的理由。 (还记得采访中的沉默吗?)
  • The candidate was not clear with the requirements even in the implementation stage.即使在实施阶段,候选人也不清楚要求。
  • The candidate struggled with the implementation and he was not able to pick up hints pointing towards the solution.候选人在实施过程中苦苦挣扎,他无法获得指向解决方案的提示。
  • The candidate failed to identify the bugs in code, even after providing enough time and probing to check if the solution is correct.即使提供了足够的时间并尝试检查解决方案是否正确,候选人仍无法识别代码中的错误。

If this were an actual interview, the candidate would have been rejected. Now how should the ideal interview go?

如果这是一次实际的面试,候选人将被拒绝。 现在理想的面试应该如何进行?

第二次面试 (Second interview)

Interviewer (I): Hi, Welcome to our company. I am xxx doing yyy. So tell me about yourself.

访员(I) :您好,欢迎来到我们公司。 我正在做yyy。 请你介绍你自己。

Candidate (C) : I am xxx. I have about 5 years of experience in Backend development. I love solving technical problems.....

候选人(C) :我是xxx。 我在后端开发方面有大约5年的经验。 我喜欢解决技术问题。

I: That's great. So shall we move on to the problem-solving part?

:太好了。 那么,我们应该继续解决问题了吗?

C: Sure!

C :当然!

I: So you are given a binary tree. I want you to invert the binary tree and print the resulting tree.

:所以给你一棵二叉树。 我希望您反转二叉树并打印结果树。

C: (Thinking out loud) Cool. So a binary tree has two nodes. So what exactly is inverting? is it swapping the left and right?

C :( 大声思考)酷。 因此,二叉树有两个节点。 那么到底是什么呢? 左右互换吗?

I: Exactly. So left node should be on the right and vice versa.

:是的。 因此,左侧节点应位于右侧,反之亦然。

C: Ok. So in this case what happens?

C :好的。 那么在这种情况下会发生什么呢?

Provides an example and clarifies input and output

提供示例并阐明输入和输出

I: You are correct to some extent. But this should happen for the whole tree, not just the root alone.(Notice how early the requirements were solidified)

:你在某种程度上是正确的。 但这应该在整个树上发生,而不仅仅是根系上。 (请注意,要求在多久之前得到了巩固)

C: Oh got it! So I am thinking I need to do it recursively. Man, that's tough! Let me see. But before that, I'll just check my understanding by running through one more example.Provides one more eg to clarify any missing pieces

C :哦! 所以我想我需要递归地做。 伙计,那很难! 让我看看。 但在此之前,我将通过再举一个例子来检验我的理解。 提供另外一个,例如以澄清任何遗漏的部分

I: Yes you are right. That's the output. I think you got the problem completely. So how do you approach it?

:是的,你是对的。 这就是输出。 我认为您完全解决了问题。 那么您如何处理呢?

C: Let me see. So to swap left and right, I can just use a temp. But then how will I do it for remaining? Oh ya, I could just recurse for the others and do the same.

C :让我看看。 因此,要左右互换,我可以使用临时模板。 但是那我该如何做才能保留下来呢? 哦,我可以为其他人递归然后做同样的事情。

I: Cool. Is there any problem with that approach?

:酷。 这种方法有什么问题吗?

C: Hmmm. Yes, if I just swap the left and right recursively, how will I track the old and new tree?

C :嗯。 是的,如果我仅递归地交换左右,我将如何跟踪新旧树?

I: I am not sure I am following you. What is old and new?

:我不确定我是否在关注你。 什么是新旧?

C: What I meant is, there will be updated children, I need to swap them and not the old children.

C :我的意思是,将会有更新的孩子,我需要交换他们,而不是老孩子。

I: Yes, correct.

:是的,正确。

C: Ya I can just call this function recursively for left and right and store those values in a variable. I could then update the tree with those variables. This way I can make sure the whole tree is inverted.

C :是的,我可以为左和右递归调用此函数,并将这些值存储在变量中。 然后,我可以使用这些变量更新树。 这样,我可以确保整个树都被倒置。

I: Cool. Anything else you are missing?

:好酷。 您还有什么想念的吗?

C: No I think. So it will take O(n) time and O(1) space as I don't use any extra space.(Notice how proactively the candidate discusses time and space)

C :不,我想。 因此,这将占用O(n)时间和O(1)空间,因为我不使用任何额外的空间。 (请注意候选人如何积极地讨论时间和空间)

I: I am fine. You can start coding.

:很好。 您可以开始编码。

C: Sure. (Talks through the code while coding)

C :当然。 (在编码时会讲解代码)

def invert(node)invert(node.left)invert(node.right)node.left,node.right = node.right, node.leftreturn node
end

C: So I am done. Let me walk you through my code. So for a tree like ...(Explains and dry runs with an example)

C :我完成了。 让我一窥您的代码。 因此,对于像...这样的树(用示例说明和空转)

I: I guess you are right. Does it work for all cases?

:我想你是对的。 它适用于所有情况吗?

C: Hmmm. I guess I'll get Null pointer exception for an empty tree. Let me fix that by adding a null check.

C :嗯。 我猜我会为空树得到Null指针异常。 让我通过添加空检查来解决此问题。

I: Now it looks good. Anything else you are missing.

:现在看起来不错。 您还缺少什么。

C: No, I think other things I have covered like no leaves, one leaf, etc.(Notice how he calls out each case he considered)

C :不,我认为我所涵盖的其他内容,例如无叶,一片叶子等。 (请注意,他如何指出他考虑的每种情况)

I: Cool. I am good. Any questions? :)

:酷。 我很好。 任何问题? :)

反馈 (Feedback)

So what do you think about this interview?

那么您如何看待这次采访?

  • The candidate clarified the requirements before starting implementation.候选人在开始实施之前澄清了要求。
  • The candidate also froze the requirements by running through a few examples and clarifying his understanding.候选人还通过列举一些例子并阐明自己的理解来冻结要求。
  • The candidate came up with a working solution without any probing.候选人提出了一个可行的解决方案,没有进行任何调查。
  • The candidate proactively discussed the time and space complexities.候选人主动讨论了时间和空间的复杂性。
  • While coding, the candidate had a clear vision of what he was doing and where he was going.在编码时,应聘者对自己的工作和去向有清晰的认识。
  • The candidate had a bug in his code, and when asked to check for errors, he found the error and rectified it themselves.候选人的代码中有一个错误,当被要求检查错误时,他发现了错误并自行纠正。

结论 (Conclusion)

Interviewing is a completely different skill from coding. Even though you are good at problem-solving, the interview is a setting where the interviewer is trying to decide between hiring you or not. So in addition to coding, you also need to understand the interviewer's perspective so that you make it easy for him to hire you. In this article, I wanted to compare and contrast a good interview vs a mediocre one. Try to practice interview skills separately as the more you practice the better you get at it. You can reach out to me if you need help taking mock interviews.

面试是与编码完全不同的技能。 即使您擅长解决问题,面试还是一个环境,面试者会在此环境中决定是否雇用您。 因此,除了编码外,您还需要了解面试官的观点,以便您轻松地聘用面试官。 在本文中,我想比较和比较一个好的访谈与一个普通的访谈。 尝试分别练习面试技巧,因为练习越多,就会越好。 你可以伸手给我,如果你需要帮助,采取模拟面试。

This article was first published on http://kaizencoder.com. If you liked this article, please visit to read more like this or learn more about me!

本文最初在http://kaizencoder.com上发布。 如果您喜欢这篇文章,请访问以类似文章或了解有关我的更多信息!

翻译自: https://www.freecodecamp.org/news/behind-the-scenes-of-coding-interviews-good-vs-bad/

动画电影的幕后英雄怎么说好

动画电影的幕后英雄怎么说好_幕后编码面试-好与坏相关推荐

  1. javascript面试_在编码面试中需要注意的3个JavaScript问题

    javascript面试 JavaScript is the official language of all modern web browsers. As such, JavaScript que ...

  2. php黄金搭档_动画电影电子游戏的搭档实际上很棒

    php黄金搭档 回顾性 (RETROSPECTIVE) Disclaimer: I don't intend for these games to compete with top-tier AAA ...

  3. 计算机动画电影英语翻译,英语翻译_推荐!最适合练口语的10部动画电影_沪江英语...

    小编导读:在学习英语的过程中,有不少人通过各种影视剧来提升英语语感.增加词汇量还有积累地道表达.尤其是那些英语动画电影,因为发音清晰.情感丰富以及大量的日常对话深受大家欢迎,但是要注意的是,并不是所有 ...

  4. unity vr是加一个摄像机就行吗_《狮子王》:引入VR虚拟制作技术的真人动画电影...

    迪士尼动画电影<狮子王>自2019年7月12日上映以来,排场几近爆满,深受影迷喜爱,目前三天多的票房总计已高达四亿.其实从去年11月23日爆出预告片以后,迪士尼动画粉的胃口就已经被吊了起来 ...

  5. 深度学习三巨头也成了大眼萌,这个一键转换动画电影形象的网站竟因「太火」而下线...

    机器之心报道 作者:魔王.杜伟 想不想在动画电影中拥有自己的角色?这个网站一键满足你的需求,不过竟因流量太大成本过高而下线. 近期热映的电影<花木兰>总是让人回想起 1998 年上映的同名 ...

  6. 参加动画电影《魔比斯环》首映

    今天带女儿阿梅尔到东方新天地电影城参加动画电影<魔比斯环>的首映式.据说这是我国第一部投资过亿的三维动画电影.女儿还参加了现场做画秀. 最后女儿被专业评委评为第一名,并接受了中央电视台电影 ...

  7. 5部适合学英语的动画电影,快和孩子一起看!

    全世界只有3.14 % 的人关注了 爆炸吧知识 今天我们与大家分享5部非常适合小学生学习英语的动画电影,家长们可依据不同类别和主题为孩子挑选喜欢的影片,在家陪孩子一起观看.文末可免费领取哦~ 01 & ...

  8. 流浪地球开机动画包zip_影视日报|合家欢动画电影quot;许愿神龙quot;定档1.15;流浪地球加长版定档11.26...

    1.合家欢动画电影"许愿神龙"定档1.15 动画电影<许愿神龙>正式定档2021年1月15日,并发布定档海报.2.白客等万万兄弟助力易小星"沐浴之王" ...

  9. 《哪吒之魔童降世》观影人次突破1亿大关 为动画电影之最!

    8月13日消息,据猫眼电影发布的微博显示,上映第19天,<哪吒之魔童降世>观影人次突破1亿大关.据悉,<哪吒之魔童降世>是有数据统计以来,继<战狼2><流浪地 ...

最新文章

  1. Linux 与 硬件 —— 各个硬件设备在Linux中的文件名
  2. HDU 4288 Coder [线段树]
  3. win7台式电脑怎么连wifi_修改WiFi密码后电脑连不上网如何解决 修改WiFi密码后电脑连不上网解决方法【详解】...
  4. Axure实现多用户注册验证
  5. javascript创建类_如何使用JavaScript创建吹气效果
  6. jpa java.util.map_使用JPA存储Map String,String
  7. (91)如何网表文件?
  8. 人脸方向学习(二):人脸质量评价-质量判断总结
  9. Web终端SSH功能
  10. 大一计算机基础ppt练习题,计算机基础知识PPT练习题及答案DOC
  11. Vue中<keep-alive>组件的使用
  12. matlab伴随矩阵怎么表示,怎样用Matlab求矩阵的伴随矩阵
  13. Ubuntu 图标主题 Nitrux 升级
  14. 中文冒号vs英文冒号
  15. 计算机表格中的乘法怎么用,excel表格中怎么使用乘法公式
  16. npm install报错214 verbose node v14.15.0 215 verbose npm v7.23.0
  17. Canvas实用库收藏
  18. 小米12和小米11pro的区别
  19. ECharts实现两根柱子重叠在一起的柱状图
  20. 数学建模与数据分析中的时间序列分析

热门文章

  1. 【C++ Primer | 15】面试问题
  2. 最新BAT大厂面试者整理的Android面试题目模板,分享PDF高清版
  3. ES6学习笔记(六)数组的扩展
  4. bzoj 2756奇怪的游戏
  5. 北方网-ios预科班
  6. IRasterStatistics Interface
  7. 水晶报表-简单数据类型(Crystal 语法)
  8. docker 全部杀掉
  9. 基于easyui开发Web版Activiti流程定制器详解(三)——页面结构(上)
  10. Silverlight:Downloader的使用(event篇)