《Cracking the Coding Interview》——第12章:测试——题目5·
2014-04-25 00:41
题目:怎么测试一支笔?(Pen?您老说的是钢笔?)
解法:这种简约而不简单的题目,实在是面试官最喜欢,面试者最头疼的类型了。面试官可以只花三秒,以一种灰常高贵冷艳的语气甩出这道题。然后头疼脑热的就是你了。怎么做呢?Brainstorming,找特征,分解问题,关联问题和特征,然后按规矩解题。我个人觉得这类题其实不是考察创意,而是考察发现问题、分析问题、解决问题的思路是否够清晰,就算解不出来也没事的。
代码:
// 12.5 How would you test a pen?
// Answer:
// 1. A pen uses ink.
// 2. A pen usually writes on paper.
// 3. The volume of ink in the pen is usually small.
// 4. Sometimes when the pen is used for too long, we wash the pen with water and dry it.
// 5. When drawing ink from the ink bottle, we squeeze the ruber tube and releases it to draw the ink up into the pen.
// Above all the things, there are a few things to be tested:
// 1. the ruber tube which contains the ink.
// 1.a. is it elastic enough?
// 2. a very thin pipe, from which ink flows into the pen.
// 2.a. is it easily blocked?
// 2.b. does it break easily?
// 3. the upper cover, which protects the ruber tube inside it.
// 3.a. can the whorl fit tight?
// 3.b. is the cover firm enough? does it crack easily?
// 4. the tip of the pen, through which the ink flow out.
// 4.a. it is actually a pipe, does it block easily?
// 4.b. write it on different paper textures, does it write smoothly?
// 4.c. it is steel, does it rust easily?
int main()
{
return ;
}
《Cracking the Coding Interview》——第12章:测试——题目5·的更多相关文章
- Cracking the coding interview 第一章问题及解答
Cracking the coding interview 第一章问题及解答 不管是不是要挪地方,面试题具有很好的联系代码总用,参加新工作的半年里,做的大多是探索性的工作,反而代码写得少了,不高兴,最 ...
- 《Cracking the Coding Interview》读书笔记
<Cracking the Coding Interview>是适合硅谷技术面试的一本面试指南,因为题目分类清晰,风格比较靠谱,所以广受推崇. 以下是我的读书笔记,基本都是每章的课后习题解 ...
- Cracking the coding interview
写在开头 最近忙于论文的开题等工作,还有阿里的实习笔试,被虐的还行,说还行是因为自己的水平或者说是自己准备的还没有达到他们所需要人才的水平,所以就想找一本面试的书<Cracking the co ...
- Cracking the coding interview目录及资料收集
前言 <Cracking the coding interview>是一本被许多人极力推荐的程序员面试书籍, 详情可见:http://www.careercup.com/book. 第六版 ...
- Cracking the Coding Interview(Trees and Graphs)
Cracking the Coding Interview(Trees and Graphs) 树和图的训练平时相对很少,还是要加强训练一些树和图的基础算法.自己对树节点的设计应该不是很合理,多多少少 ...
- Cracking the Coding Interview(Stacks and Queues)
Cracking the Coding Interview(Stacks and Queues) 1.Describe how you could use a single array to impl ...
- 《Cracking the Coding Interview》——第12章:测试——题目6
2014-04-25 00:53 题目:你要如何测试一个分布式银行系统的ATM机? 解法:ATM是Automatic Teller Machine,取钱的.我想了半天,没找到什么很清晰的思路,也许是因 ...
- 《Cracking the Coding Interview》——第12章:测试——题目4
2014-04-25 00:35 题目:没有专门的测试工具,你要如何对一个网页进行压力测试? 解法:拼手速,拼电脑数量呗.快捷键+复制粘贴网址,狂搞一番.话说回来,有脚本语言的情况下,直接写个脚本来模 ...
- 《Cracking the Coding Interview》——第12章:测试——题目3
2014-04-24 23:28 题目:玩象棋游戏,你要设计一个bool型的方法来检测一个棋子能否移动到指定位置. 解法:不同的棋子有不同的移动规则,那么应该采取棋子基类实现接口,各个棋子子类来实现的 ...
随机推荐
- 笨办法学Python(三十六)
习题 36: 设计和调试 现在你已经学会了“if 语句”,我将给你一些使用“for 循环”和“while 循环”的规则,一面你日后碰到麻烦.我还会教你一些调试的小技巧,以便你能发现自己程序的问题.最后 ...
- 【CSS古话今说】-- 01.神奇的CSS-BFC在实战中的应用
文章首发于掘金 BFC(Block Formatting Context)是Web页面中盒模型布局的CSS渲染模式.它的定位体系属于常规文档流. 想要实现一个BFC布局需要满足以下条件之一: 1.fl ...
- 问答 请问使用OK("raw:jpg")能返回多张图片吗
请问使用OK("raw:jpg")能返回多张图片吗 发布于 28天前 作者 qq_3aeeb0ad 78 次浏览 复制 上一个帖子 下一个帖子 标签: 无 @At( ...
- 2017.11.10 web中URL和URI的区别
URI:Uniform Resource Identifier,统一资源标识符: •URL:Uniform Resource Locator,统一资源定位符: •URN:Uniform Resourc ...
- SecureCRT 设置
- treap数组版
然而就是将指针的地方换成int引用 就是存个代码 #include<cstdio> #include<iostream> #include<cstdlib> #in ...
- C# 变量与常量
变量表示存储位置,变量必须有确定的数据类型.C#的类型安全的含义之一就是确保变量的存储位置容纳着合适的类型.可以将C#中的变量分为静态变量,实例变量,传值参数,引用参数,输出参数,数组参数和本地变量共 ...
- C-net总结
SMB服务器信息块 DHCP动态主机配置协议 STMP简单邮件传输协议 POP(邮件协议) Gnutella 网络分析数据 nslookup DNS(域名系统) 请求注释(RFC)文件 ...
- JSPatch库, 一个Apple官方支持的实现在线更新iOS应用的库
简介 项目主页: https://github.com/bang590/JSPatch 示例下载: https://github.com/ios122/ios122 JSPatch 可以让你用 Jav ...
- 关于props的注意事项!
起于昨晚大半夜在群里看到有人问这个问题,在子组件的data属性里重新赋值props属性 this.a = this.propA,不生效! 提示了他如果是异步的话,就要注意watch.决定今日敲个dem ...