動畫電影的幕后英雄怎么說好_幕后編碼面試-好與壞

動畫電影的幕后英雄怎么說好

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/

動畫電影的幕后英雄怎么說好

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/391357.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/391357.shtml
英文地址,請注明出處:http://en.pswp.cn/news/391357.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

數據庫之DML

1、表的有關操作: 1.1、表的創建格式: CREATE TABLE IF NOT EXISTS 表名(屬性1 類型,屬性2 類型,....,屬性n 類型);# 標記部分表示可以省略 1.2、表的修改格式:ALTER table 表名 ADD…

網絡對抗技術作業一 201421410031

姓名:李冠華 學號:201421410031 指導教師:高見 1、虛擬機安裝與調試 安裝windows和linux(kali)兩個虛擬機,均采用NAT網絡模式,查看主機與兩個虛擬機器的IP地址,并確保其連通性。同時…

生存分析簡介:Kaplan-Meier估計器

In my previous article, I described the potential use-cases of survival analysis and introduced all the building blocks required to understand the techniques used for analyzing the time-to-event data.在我的上一篇文章中 ,我描述了生存分析的潛在用例…

強密碼檢測

#!/usr/bin/env python # -*- coding: utf-8 -*- #1. 密碼長度應該大于或等于8位 #2. 密碼必須包含數字、字母及特殊字符三種組合 nums 0123456789 chars1 abcdefghijklmnopqrstuvwxyz chars2 ABCDEFGHIJKLMNOPQRSTUVWXYZ symbols r!#$%^&*()_-/*{}[]\|";:/?…

OD Linux發行版本

題目描述: Linux操作系統有多個發行版,distrowatch.com提供了各個發行版的資料。這些發行版互相存在關聯,例如Ubuntu基于Debian開發,而Mint又基于Ubuntu開發,那么我們認為Mint同Debian也存在關聯。 發行版集是一個或多…

Go語言實戰 : API服務器 (3) 服務器雛形

簡單API服務器功能 實現外部請求對API 服務器健康檢查和狀態查詢,返回響應結果 1.API服務器的狀態監測 以內存狀態檢測為例,獲取當前服務器的健康狀況、服務器硬盤、CPU 和內存使用量 func RAMCheck(c *gin.Context) {u, _ : mem.VirtualMemory()//獲…

TCP/IP協議-1

轉載資源,鏈接地址https://www.cnblogs.com/evablogs/p/6709707.html 轉載于:https://www.cnblogs.com/Chris-01/p/11474915.html

http://nancyfx.org + ASPNETCORE

商務產品servicestack: https://servicestack.net/ http://nancyfx.org ASPNETCORE http://nancyfx.org Drapper ORM精簡框架 https://github.com/StackExchange/Dapper Nancy 是一個輕量級用于構建基于 HTTP 的 Web 服務,基于 .NET 和 Mono 平…

使用r語言做garch模型_使用GARCH估計貨幣波動率

使用r語言做garch模型Asset prices have a high degree of stochastic trends inherent in the time series. In other words, price fluctuations are subject to a large degree of randomness, and therefore it is very difficult to forecast asset prices using traditio…

ARC下的內存泄漏

##ARC下的內存泄漏 ARC全稱叫 ARC(Automatic Reference Counting)。在編譯期間,編譯器會判斷對象的使用情況,并適當的加上retain和release,使得對象的內存被合理的管理。所以,從本質上說ARC和MRC在本質上是一樣的,都是…

python:校驗郵箱格式

# coding:utf-8import redef validateEmail(email):if re.match("^.\\(\\[?)[a-zA-Z0-9\\-\\.]\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$", email) ! None:# if re.match("/^\w[a-z0-9]\.[a-z]{2,4}$/", email) ! None:print okreturn okelse:print failret…

cad2019字體_這些是2019年最有效的簡歷字體

cad2019字體When it comes to crafting the perfect resume to land your dream job, you probably think of just about everything but the font. But font is a key part of your first impression to recruiters and employers.當制作一份完美的簡歷來實現理想的工作時&…

Go語言實戰 : API服務器 (4) 配置文件讀取及連接數據庫

讀取配置文件 1. 主函數中增加配置初始化入口 先導入viper包 import (..."github.com/spf13/pflag""github.com/spf13/viper""log")在 main 函數中增加了 config.Init(*cfg) 調用,用來初始化配置,cfg 變量值從命令行 f…

方差偏差權衡_偏差偏差權衡:快速介紹

方差偏差權衡The bias-variance tradeoff is one of the most important but overlooked and misunderstood topics in ML. So, here we want to cover the topic in a simple and short way as possible.偏差-方差折衷是機器學習中最重要但被忽視和誤解的主題之一。 因此&…

win10 uwp 讓焦點在點擊在頁面空白處時回到textbox中

原文:win10 uwp 讓焦點在點擊在頁面空白處時回到textbox中在網上 有一個大神問我這樣的問題:在做UWP的項目,怎么能讓焦點在點擊在頁面空白處時回到textbox中? 雖然我的小伙伴認為他這是一個 xy 問題,但是我還是回答他這個問題。 首…

python:當文件中出現特定字符串時執行robot用例

#coding:utf-8 import os import datetime import timedef execute_rpt_db_full_effe_cainiao_city():flag Truewhile flag:# 判斷該文件是否存在# os.path.isfile("/home/ytospid/opt/docker/jsc_spider/jsc_spider/log/call_proc.log")# 存在則獲取昨天日期字符串…

MySQL分庫分表方案

1. MySQL分庫分表方案 1.1. 問題:1.2. 回答: 1.2.1. 最好的切分MySQL的方式就是:除非萬不得已,否則不要去干它。1.2.2. 你的SQL語句不再是聲明式的(declarative)1.2.3. 你招致了大量的網絡延時1.2.4. 你失去…

linux創建sudo用戶_Linux終極指南-創建Sudo用戶

linux創建sudo用戶sudo stands for either "superuser do" or "switch user do", and sudo users can execute commands with root/administrative permissions, even malicious ones. Be careful who you grant sudo permissions to – you are quite lit…

重學TCP協議(1) TCP/IP 網絡分層以及TCP協議概述

1. TCP/IP 網絡分層 TCP/IP協議模型(Transmission Control Protocol/Internet Protocol),包含了一系列構成互聯網基礎的網絡協議,是Internet的核心協議,通過20多年的發展已日漸成熟,并被廣泛應用于局域網和…

分節符縮寫p_p值的縮寫是什么?

分節符縮寫pp是概率嗎? (Is p for probability?) Technically, p-value stands for probability value, but since all of statistics is all about dealing with probabilistic decision-making, that’s probably the least useful name we could give it.從技術…