算法/数据结构设计面试问题 [英] Algorithm/Data Structure Design Interview Questions

查看:149
本文介绍了算法/数据结构设计面试问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是一些简单的算法和数据结构相关的白板的问题,你会发现在候选人筛选过程是否有效?

What are some simple algorithm or data structure related "white boarding" problems that you find effective during the candidate screening process?

我有一些简单的人,我用它来验证解决问题的能力,并且可以pssed简单的前$ P $,但有一些机会,一些启发式的应用程序。

I have some simple ones that I use to validate problem solving skills and that can be simply expressed but have some opportunity for the application of some heuristics.

一,我使用的初级开发人员的基础是:

One of the basics that I use for junior developers is:

编写一个C#方法,它包含了一组词(句)和旋转的地方正确的字×号的字符串。当在句子的最后一个位置一个字旋转它应该出现在结果字符串的前面。

Write a C# method that takes a string which contains a set of words (a sentence) and rotates those words X number of places to the right. When a word in the last position of the sentence is rotated it should show up at the front of the resulting string.

当候选人回答了这个问题,我期待看到他们现有的.NET数据结构和方法(的string.join,string.Split,列表等)来解决这个问题。我也找他们确定的特殊情况进行优化。像次数需要的话要被旋转的数量不是真正为它的词语的X%数目

When a candidate answers this question I look to see that they available .NET data structures and methods (string.Join, string.Split, List, etc...) to solve the problem. I also look for them to identify special cases for optimization. Like the number of times that the words need to be rotated isn't really X it's X % number of words.

什么是一些您使用面试的候选人,什么是一些你的答案寻找的东西白板问题(不需要张贴实际的答案)。

What are some of the white board problems that you use to interview a candidate and what are some of the things you look for in an answer (do not need to post the actual answer).

推荐答案

我喜欢经典的什么是一个链表和一个ArrayList之间的差异(或链表和数组/向量之间),为什么你会选择一个或其他的?

I enjoy the classic "what's the difference between a LinkedList and an ArrayList (or between a linked list and an array/vector) and why would you choose one or the other?"

这样回答的,我希望的是包括讨论:

The kind of answer I hope for is one that includes discussion of:

  • 插入性能
  • 在迭代的性能
  • 在内存分配/再分配的影响
  • 从一开始/中间/结束删除元素的影响
  • 如何知道(或不知道)的列表的最大尺寸可以影响决定

这篇关于算法/数据结构设计面试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆