You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
前段时间看到Jeff Atwood(StackOverflow创始人)的书_Effective Programming: More Than Writing Code_讲如何招人,说到电面的五个大方面,感觉有必要分享一下。个人觉得这就是所谓的“打好基础”要准备的东西。
这五个方向:
Coding The candidate has to write some simple code, with correct syntax, in C, C++, or Java.
OO design The candidate has to define basic OO concepts, and come up with classes to model a simple problem.
Scripting and regexes The candidate has to describe how to find the phone numbers in 50,000 HTML pages.
Data structures The candidate has to demonstrate basic knowledge of the most common data structures.
Bits and bytes The candidate has to answer simple questions about bits, bytes, and binary numbers.
每个方向还出了几道题:
Coding
Write a function to reverse a string
Write function to compute Nth fibonacci number
Print out the grade-school multiplication table up to 12x12
Write a function that sums up integers from a text file, one int per line
Write function to print the odd numbers from 1 to 99
Find the largest int value in an int array
Format an RGB value (three 1-byte numbers) as a 6-digit hexadecimal string
Object-Oriented Programming
Design a deck of cards that can be used for different card game applications
Model the Animal kingdom as a class system, for use in a Virtual Zoo program
Create a class design to represent a filesystem
Design an OO representation to model HTML
Scripting and Regular Expressions
Last year my team had to remove all the phone numbers from 50,000 Amazon web page templates, since many of the numbers were no longer in service, and we also wanted to route all customer contacts through a single page.
Let's say you're on my team, and we have to identify the pages having probable U.S. phone numbers in them. To simplify the problem slightly, assume we have 50,000 HTML files in a Unix directory tree, under a directory called "/website". We have 2 days to get a list of file paths to the editorial staff. You need to give me a list of the .html files in this directory tree that appear to contain phone numbers in the following two formats: (xxx) xxx-xxxx and xxx-xxx-xxxx.
Data Structures
What are some really common data structures, e.g. in java.util?
When would you use a linked list vs. a vector?
Can you implement a Map with a tree? What about with a list?
How do you print out the nodes of a tree in level-order (i.e. first level, then 2nd level, then 3rd level, etc.)
What's the worst-case insertion performance of a hashtable? Of a binary tree?
What are some options for implementing a priority queue
Bits and Bytes
Tell me how to test whether the high-order bit is set in a byte.
Write a function to count all the bits in an int value; e.g. the function with the signature int countBits(int x)
Describe a function that takes an int value, and returns true if the bit pattern of that int value is the same if you reverse it (i.e. it's a palindrome); i.e. boolean isPalindrome(int x)
前段时间看到Jeff Atwood(StackOverflow创始人)的书_Effective Programming: More Than Writing Code_讲如何招人,说到电面的五个大方面,感觉有必要分享一下。个人觉得这就是所谓的“打好基础”要准备的东西。
这五个方向:
每个方向还出了几道题:
Coding
Object-Oriented Programming
Scripting and Regular Expressions
Last year my team had to remove all the phone numbers from 50,000 Amazon web page templates, since many of the numbers were no longer in service, and we also wanted to route all customer contacts through a single page.
Let's say you're on my team, and we have to identify the pages having probable U.S. phone numbers in them. To simplify the problem slightly, assume we have 50,000 HTML files in a Unix directory tree, under a directory called "/website". We have 2 days to get a list of file paths to the editorial staff. You need to give me a list of the .html files in this directory tree that appear to contain phone numbers in the following two formats: (xxx) xxx-xxxx and xxx-xxx-xxxx.
Data Structures
Bits and Bytes
注:得知这些东西来自于Steve Yegge 的一篇博客The Five Essential Phone-Screen Questions ,里面有详细的描述与解答。
The text was updated successfully, but these errors were encountered: