您的位置:首页 > 职场人生

记录自己的一次thoughtworks的面试经历

2019-01-17 17:29 651 查看

这说起来是一次很懵的面试经验,博主年底跳槽了,然后在找工作的时候有个拉勾网的猎头找到我,说可以给我推thoughtworks的一个工作,我当时也是想着有机会就抓住,就答应下来了,然后发了简历,要了我的github账号(还好我自己之前闲的无聊,自己搞了一个),CSDN账号,说这两个是加分项。给完后就没有消息了,我也没管,过了一段时间给我发消息说简历通过了,然后会有HR小姐姐给我打电话。

OK,开始进入正题。

过了一天吧,HR小姐姐给我打电话了,问了好多,打了大概有二十多分钟的时间,主要是问一些基本的信息,学校,专业,上一家公司为什么离职,都会那些技术,做过的项目大概说一下,然后让英语介绍一下自己,到这楼主就抓瞎了,虽然四级过了,但是毕业这么一年半的时间基本上没有英语交流过,刚刚说了两句就说不下去了,HR小姐姐说不要勉强自己(这是深深的鄙视啊),然后再聊了一会其他的,问对thoughtworks的了解啊啥的,还有自己想问的问题,沟通差不多后说HR基本面试可以,然后会给我一套题,三天内做完,按照指定的网址提交就行。

你以为就那么简单?不,题发到邮箱后我懵了,这次是真的懵,全英文。看不懂啊!!!我在下面贴出来。

题目

Hi,
It was great speaking with you! As per our conversation, here’s the next step in our hiring process. Below are three programming problems. Please read all three descriptions thoroughly then create a program to solve ONE of the problems. If you submit more than one solution, we will review only one.
Note:
• For the solution, we request that you use Java, Ruby, C#, Python, Clojure, Scala or JavaScript.
• There must be a way to supply the application with the input data via text file
• The application must run
• You should provide sufficient evidence that your solution is complete by indicating that it works correctly against the supplied test data
• Please use the URL at the bottom of this email to submit your code, meanwhile, please kindly attached the homework to your recruiter’s mail.
• Name your homework as: (name)–(trains/conference/galaxy)–**(programming languages)
Rules:

  1. You may not use any external libraries to solve this problem, but you may use external libraries or tools for building or testing purposes. Specifically, you may use unit-testing libraries or build tools available for your chosen language (e.g., JUnit, Ant, NUnit, Rspec, Rake, etc.).
  2. System security is very important to us and certain file extensions will be blocked for security purposes, resulting in delays to your application. You should NOT include any executable attachments, including those with .exe or .lib extensions. We need to be able to run and build your code ourselves, so please submit your code as a zipped file of source code and supporting files, without any compiled code. If you’re submitting in C#, please do not submit your code as a .msi file.
  3. Please include a brief explanation of your design and assumptions, along with your code, as well as detailed instructions to run your application.
  4. We assess a number of things including the design aspect of your solution and your object oriented programming skills. While these are small problems, we expect you to submit what you believe is production-quality code; code that you’d be able to run, maintain, and evolve. You don’t need to gold plate your solution, however we are looking for something more than a bare-bones algorithm.
  5. We want our hiring process to be fair, and for everyone to start from the same place. To enable this, we request that you do not share or publish these problems.
  6. Please compress your files into a single .zip file before upload. Kindly ensure there are no executables in your submission. Our system blocks executable files for security purposes, and we want to avoid any delays in your process.
  7. **Executables include asp, bat, class, cmd, com, cpl, dll, exe, fon, hta, ini, ins, iw, jar, jsp, js, jse, pif, scr, shs, sh, vb, vbe, vbs, ws, wsc, wsf, wsh & msi
    As a general rule, we allow three days from the date that you receive these instructions to submit your code, but you may request more time from your recruiter if needed. If you have any questions about the code as it relates to your interview process, please contact your recruiter.

Problem one: Trains

The local commuter railroad services a number of towns in Kiwiland. Because of monetary concerns, all of the tracks are ‘one-way.’ That is, a route from Kaitaia to Invercargill does not imply the existence of a route from Invercargill to Kaitaia. In fact, even if both of these routes do happen to exist, they are distinct and are not necessarily the same distance!

The purpose of this problem is to help the railroad provide its customers with information about the routes. In particular, you will compute the distance along a certain route, the number of different routes between two towns, and the shortest route between two towns.

Input: A directed graph where a node represents a town and an edge represents a route between two towns. The weighting of the edge represents the distance between the two towns. A given route will never appear more than once, and for a given route, the starting and ending town will not be the same town.

Output: For test input 1 through 5, if no such route exists, output ‘NO SUCH ROUTE’. Otherwise, follow the route as given; do not make any extra stops! For example, the first problem means to start at city A, then travel directly to city B (a distance of 5), then directly to city C (a distance of 4).

  1. The distance of the route A-B-C.
  2. The distance of the route A-D.
  3. The distance of the route A-D-C.
  4. The distance of the route A-E-B-C-D.
  5. The distance of the route A-E-D.
  6. The number of trips starting at C and ending at C with a maximum of 3 stops. In the sample data below, there are two such trips: C-D-C (2 stops). and C-E-B-C (3 stops).
  7. The number of trips starting at A and ending at C with exactly 4 stops. In the sample data below, there are three such trips: A to C (via B,C,D); A to C (via D,C,D); and A to C (via D,E,B).
  8. The length of the shortest route (in terms of distance to travel) from A to C.
  9. The length of the shortest route (in terms of distance to travel) from B to B.
  10. The number of different routes from C to C with a distance of less than 30. In the sample data, the trips are: CDC, CEBC, CEBCDC, CDCEBC, CDEBC, CEBCEBC, CEBCEBCEBC.

Test Input:
For the test input, the towns are named using the first few letters of the alphabet from A to D. A route between two towns (A to B) with a distance of 5 is represented as AB5.
Graph: AB5, BC4, CD8, DC8, DE6, AD5, CE2, EB3, AE7
Expected Output:
Output #1: 9
Output #2: 5
Output #3: 13
Output #4: 22
Output #5: NO SUCH ROUTE
Output #6: 2
Output #7: 3
Output #8: 9
Output #9: 9
Output #10: 7

Problem Two: Conference Track Management

You are planning a big programming conference and have received many proposals which have passed the initial screen process but you’re having trouble fitting them into the time constraints of the day – there are so many possibilities! So you write a program to do it for you.
• The conference has multiple tracks each of which has a morning and afternoon session.
• Each session contains multiple talks.
• Morning sessions begin at 9am and must finish before 12 noon, for lunch.
• Afternoon sessions begin at 1pm and must finish in time for the networking event.
• The networking event can start no earlier than 4:00 and no later than 5:00.
• No talk title has numbers in it.
• All talk lengths are either in minutes (not hours) or lightning (5 minutes).
• Presenters will be very punctual; there needs to be no gap between sessions.

Note that depending on how you choose to complete this problem, your solution may give a different ordering or combination of talks into tracks. This is acceptable; you don’t need to exactly duplicate the sample output given here.

Test input:
Writing Fast Tests Against Enterprise Rails 60min
Overdoing it in Python 45min
Lua for the Masses 30min
Ruby Errors from Mismatched Gem Versions 45min
Common Ruby Errors 45min
Rails for Python Developers lightning
Communicating Over Distance 60min
Accounting-Driven Development 45min
Woah 30min
Sit Down and Write 30min
Pair Programming vs Noise 45min
Rails Magic 60min
Ruby on Rails: Why We Should Move On 60min
Clojure Ate Scala (on my project) 45min
Programming in the Boondocks of Seattle 30min
Ruby vs. Clojure for Back-End Development 30min
Ruby on Rails Legacy App Maintenance 60min
A World Without HackerNews 30min
User Interface CSS in Rails Apps 30min

Test output:
Track 1:
09:00AM Writing Fast Tests Against Enterprise Rails 60min
10:00AM Overdoing it in Python 45min
10:45AM Lua for the Masses 30min
11:15AM Ruby Errors from Mismatched Gem Versions 45min
12:00PM Lunch
01:00PM Ruby on Rails: Why We Should Move On 60min
02:00PM Common Ruby Errors 45min
02:45PM Pair Programming vs Noise 45min
03:30PM Programming in the Boondocks of Seattle 30min
04:00PM Ruby vs. Clojure for Back-End Development 30min
04:30PM User Interface CSS in Rails Apps 30min
05:00PM Networking Event

Track 2:
09:00 20000 AM Communicating Over Distance 60min
10:00AM Rails Magic 60min
11:00AM Woah 30min
11:30AM Sit Down and Write 30min
12:00PM Lunch
01:00PM Accounting-Driven Development 45min
01:45PM Clojure Ate Scala (on my project) 45min
02:30PM A World Without HackerNews 30min
03:00PM Ruby on Rails Legacy App Maintenance 60min
04:00PM Rails for Python Developers lightning
05:00PM Networking Event

Problem Three: Merchant’s Guide to the Galaxy

You decided to give up on earth after the latest financial collapse left 99.99% of the earth’s population with 0.01% of the wealth. Luckily, with the scant sum of money that is left in your account, you are able to afford to rent a spaceship, leave earth, and fly all over the galaxy to sell common metals and dirt (which apparently is worth a lot).

Buying and selling over the galaxy requires you to convert numbers and units, and you decided to write a program to help you.

The numbers used for intergalactic transactions follows similar convention to the roman numerals and you have painstakingly collected the appropriate translation between them.

Roman numerals are based on seven symbols:

Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1,000

Numbers are formed by combining symbols together and adding the values. For example, MMVI is 1000 + 1000 + 5 + 1 = 2006. Generally, symbols are placed in order of value, starting with the largest values. When smaller values precede larger values, the smaller values are subtracted from the larger values, and the result is added to the total. For example MCMXLIV = 1000 + (1000 − 100) + (50 − 10) + (5 − 1) = 1944.

• The symbols “I”, “X”, “C”, and “M” can be repeated three times in succession, but no more. (They may appear four times if the third and fourth are separated by a smaller value, such as XXXIX.) “D”, “L”, and “V” can never be repeated.
• “I” can be subtracted from “V” and “X” only. “X” can be subtracted from “L” and “C” only. “C” can be subtracted from “D” and “M” only. “V”, “L”, and “D” can never be subtracted.
• Only one small-value symbol may be subtracted from any large-value symbol.
• A number written in [16]Arabic numerals can be broken into digits. For example, 1903 is composed of 1, 9, 0, and 3. To write the Roman numeral, each of the non-zero digits should be treated separately. Inthe above example, 1,000 = M, 900 = CM, and 3 = III. Therefore, 1903 = MCMIII.
(Source: Wikipedia ( [17]http://en.wikipedia.org/wiki/Roman_numerals)

Input to your program consists of lines of text detailing your notes on the conversion between intergalactic units and roman numerals.

You are expected to handle invalid queries appropriately.

Test input:
glob is I
prok is V
pish is X
tegj is L
glob glob Silver is 34 Credits
glob prok Gold is 57800 Credits
pish pish Iron is 3910 Credits
how much is pish tegj glob glob ?
how many Credits is glob prok Silver ?
how many Credits is glob prok Gold ?
how many Credits is glob prok Iron ?
how much wood could a woodchuck chuck if a woodchuck could chuck wood ?

Test Output:
pish tegj glob glob is 42
glob prok Silver is 68 Credits
glob prok Gold is 57800 Credits
glob prok Iron is 782 Credits
I have no idea what you are talking about

Regards,
*****(HR小姐姐的名字我就不写了)
ThoughtWorks Recruiting

Copyright 2012 ThoughtWorks, Inc

题目结束

然后怎么办?懵,做吧,谷歌翻译,先翻译,理解题意,慢慢做。因为楼主在做题的时间里面也有其他的面试邀请,所以就是慢慢来做这个,大部分时间是晚上,因为白天要出去面试啊,养家糊口,选择了第一个题,火车的题目,还行吧,慢慢做,最后一天晚上提交的,提交完我就继续我的面试生涯。

我把这个事都已经快忘了,然后猎头给我发消息了,说我通过了,W H A T !!! 我都没想着自己能够通过,因为我感觉自己答得太差了,当天下午HR小姐姐又给我打电话了,嘿嘿。这次很开心的聊了一会,说恭喜我笔试通过,笔试官看到我的代码,说有亮点,虽然不是很完美,但是有几个闪光点,项目的管理啦,代码的风格、整洁度啦,算法啦,还有其他的做的很好的地方,还是很开心的,哈哈(对了,忘了说一件事,就是我忘了给打包文件里放那个README文件了,当时太忙了,给忘了,HR小姐姐说我没放)。说可以约后续的面试,先是代码的重构与拓展(两个面试官一起,交流分享)和技术点的问题与之前的项目问题(另外两个面试官),但是很可惜的是这个时候我已经找到了一家公司,已经入职了,只有拒绝掉这份面试邀请,希望以后还有机会去thoughtworks吧,毕竟也是大公司,流程太慢了。

后续的我的代码我就不放了,毕竟这个是应试,还有就是这个是人家的招聘题目,我虽然通过了,但是这样不好,祝各位可以去心仪的公司吧,哈哈

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: