面试一次又让我去面试一次_可用于下一次编码面试的5步策略

面试一次又让我去面试一次

Unlike coding tests, where you solve algorithm problems with a keyboard silently, coding interviews go beyond keyboard communications.

与编码测试不同,在编码测试中,您可以使用键盘静默地解决算法问题,而编码采访则不只是键盘通信。

It can be a daunting task, as the interviewer can see every move you make on a shared screen.

这可能是一项艰巨的任务,因为面试官可以在共享屏幕上看到您的每一个举动。

And if that wasn’t nerve-racking enough, you also need to speak out, expressing your thought process to not only elicit some hints from the interviewer but also keep the conversation flowing.

如果那还不够紧张,您还需要大声说出来,表达您的思想过程,不仅能吸引面试官的暗示,而且还能保持对话的畅通。

That’s why I was thrilled to see this algorithm design template when attending a coding practice hosted by Women Who Code San Diego:

这就是为什么当我参加由圣地亚哥妇女编码组织的编码实践时,看到这个算法设计模板而感到激动的原因:

Image for post
via Women Who Code San Diego
通过编码圣地亚哥的女性

After following each step in the template during several practices, I have developed a methodology to reduce awkward silence in my coding interviews.

在几次实践中遵循了模板中的每个步骤之后,我开发了一种方法来减少编码采访中的尴尬沉默。

Here’s my consolidated 5-step strategy:

这是我的综合5步策略:

步骤1:澄清问题 (Step 1: Clarify the Problem)

A lot of coding interviews involve writing out a function to solve the problem. Sometimes the interviewer might interpret the task differently.

许多编码面试涉及编写解决问题的功能。 有时候,面试官可能会以不同的方式解释任务。

To ensure you are both on the same page, you can start by confirming the goal of the problem, followed by the input you are given, and the output the interviewer expects to see.

为确保双方都在同一页上,您可以先确认问题的目标 ,然后输入您所输入的内容以及面试官期望看到的输出

步骤2:集体讨论示例 (Step 2: Brainstorm Examples)

To further demonstrate that you understand the problem, you can also create some examples and confirm with the interviewer.

为了进一步证明您了解问题,您还可以创建一些示例并与面试官确认。

If you are still not sure about the problem or instruction, now is a good time to ask for a few test cases.

如果您仍然不确定问题或说明,那么现在是提出一些测试案例的好时机。

步骤3:询问约束 (Step 3: Ask about Constraints)

To cover all the bases, you can also brainstorm some invalid inputs, and ask the interviewers if those inputs should be taken into considerations.

为了覆盖所有基础,您还可以集思广益一些无效的输入,并询问访问员是否应考虑这些输入。

Another follow-up question you can ask is time/space complexity, even if your initial approach will likely be brute-force.

您可能会问的另一个后续问题是时间/空间的复杂性,即使您最初的方法可能是蛮力的。

Don’t be afraid to ask questions. There were instances where, after my clarifying questions, the interviewer realized some key portions s/he neglected to mention and modified accordingly.

不要害怕问问题。 有时候,在我澄清了问题之后,面试官意识到了自己忽略的一些关键部分,并做了相应的修改。

步骤4:对您的想法进行伪编码 (Step 4: Pseudocode Your Idea)

Now that you’ve confirmed everything you can think of, it’s time to start coding!

现在,您已经确认了所有可以想到的内容,是时候开始编码了!

As part of my coding habits, I often start by pseudocoding or writing out my approach as comments (e.g. I will store these values as variables, this is where I will iterate over the array, and I will return the value here).

作为我的编码习惯的一部分,我通常从伪编码开始或将我的方法写为注释(例如,将这些值存储为变量,这是我在数组上进行迭代的地方,并将在此返回值)。

第5步:编码,讨论,优化 (Step 5: Code, Talk, Optimize)

Once you start pseudocoding, you will formulate a more concrete idea on your approach, which gives you the confidence to code out your solution.

一旦开始伪编码,您将在您的方法上制定一个更具体的想法,这使您有信心编写解决方案。

This is where you can talk as you code, reading out loud the code you are typing. After finishing a code block, you can pause and ask the interviewer for feedback.

在这里,您可以一边讲代码一边大声朗读您正在键入的代码。 在完成代码块之后,您可以暂停并要求面试官反馈。

More often than not, after you have arrived at the right solution, the interviewer will ask if you can optimize your approach.

在找到正确的解决方案之后,面试官通常会询问您是否可以优化自己的方法。

In case you can’t think of any further optimization on the spot, it might be helpful to just start with a brute-force approach instead of rushing to the optimized solution in the beginning.

如果您无法在现场考虑进一步的优化,那么从蛮力方法开始而不是一开始就急于优化解决方案可能会有所帮助。

The strategy and the template above recently led to the best coding interview I have performed. I hope they will also help you construct your own way of acing your next coding interview.

上面的策略和模板最近带来了我执行的最佳编码采访。 希望他们也能帮助您构建自己的方式来提高下一次编码面试的速度。

Do you have any additional tips? What were the best and worst coding interviews you have experienced? Let me know in the comments!

您还有其他提示吗? 您经历过的最佳和最差的编程采访是什么? 在评论中让我知道!

翻译自: https://medium.com/@annieliao/5-step-strategy-you-can-use-for-your-next-coding-interview-492a70e21662

面试一次又让我去面试一次

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值