标题: Google面试题,你都能答上吗? [打印本页] 作者: mtlca 时间: 2005-3-5 05:18 标题: Google面试题,你都能答上吗? 1. Solve this cryptic equation, realizing of 4 M& D0 M& _- j# M* R 6 V! L8 w1 Q2 _; Pcourse that values for M and E could be % O/ ~7 N( O J) Z" M1 y% G( J$ {3 e
interchanged. No leading zeros are allowed.3 n8 n# P& M' Q# `8 ~
% Y6 M7 ~. p3 Z0 ?6 e! O
/ k2 }* K) J4 U+ b# _6 B5 N 0 F4 l5 E: z1 }) y) `2. Write a haiku describing possible methods; X$ v4 J M- u {! w* {' I
; L4 F1 y7 |1 v4 W. {1 yfor predicting search traffic seasonality.* h0 _9 P0 Y/ x+ @
( \1 {: o! r, w o- j' o0 n* n! A
* b1 n: [8 S+ d) C8 H
! a/ ^, k& S, i# p% S! N9 n4 N3.( i. b& \8 X! Q- r2 d3 Y
% d5 w7 v+ z/ z3 L7 T/ o: M1 . J( i# N% _, t6 Z2 R* \/ s- W& l: G4 d& m
1 13 }% z7 q+ z& h5 C" C0 e
j# e" t8 L/ I+ u* ^
2 1/ q! ]0 h! O% U, m0 l* r
. y; H0 Y1 f- U
1 2 1 1 d U9 Q# U; l1 O9 y
( c$ @4 W- B, {4 m% M
1 1 1 2 2 1 8 ?6 j! o1 {# T6 K I! G2 m 6 y. _+ d- q7 w) T! m * _* X0 G: e$ f5 n3 q! I- s / |7 n7 M1 U/ r3 a) t& S! A& EWhat is the next line? + ]9 M1 W$ h& S7 s& V: Q3 f3 J$ R, ]* J2 I& F+ Z
3 U) n; h- c6 J
( `) z* l4 }5 j" l9 e p. O; ~4. You are in a maze of twisty little passages,( U( d" q1 E5 n. f8 C
+ a7 a" t0 g% {# c* L& l: a
all alike. There is a dusty laptop here with a 3 O9 i( k. F8 B; s4 `* }7 M! C6 m: n
weak wireless connection. There are dull, # s9 i! j: {* p/ u; H% y2 \7 Y( n4 w' H. Q9 n9 _
lifeless gnomes strolling about. What dost ( Q% }* u5 }8 w* V l& N ; x! J1 \* g! _ V9 v! q z$ A2 Jthou do? * y5 s$ P8 r$ ~2 g5 T, N' b" a: j3 c8 ^/ ~" Q% ^+ v1 L: u1 C
, z- j$ y5 N- n
0 ]: G# n5 q# X
A) Wander aimlessly, bumping into3 b) J) J2 N+ z0 i/ X
- h s: E9 ?' [, c3 ^obstacles until you are eaten by a grue. 6 P0 O3 P2 K1 ~( p/ E & ]7 [0 L! C& m. _2 kB) Use the laptop as a digging device to$ J$ o0 ~) g6 g# g6 A! Y% X- M
7 S: }3 b8 L$ b6 Y2 [
tunnel to the next level.; j+ k" a, ?( u5 p) M
, _) N! j! P# [: K) I9 CC) Play MPoRPG until the battery dies( L( e8 k' W$ h2 c0 H- |+ R
5 {& R; ]! C2 U2 ?* M4 A* d' T
along with your hopes. ( n* {, g( H/ V2 b) ?7 A1 f ( P k4 X" a5 l" wD) Use the computer to map the nodes - s3 e7 O' C6 x, ] ' [- a6 P$ s% O% Mof the maze and discover an exit path.! Z) L: q; m$ @& I5 x
" g/ w9 |, [: @! B7 QE) Email your resume to Google, tell the5 M# I9 H, w9 Z9 _0 y! D- ~
- G* B+ H+ ?4 S" f' ]
lead gnome you quit and find yourself # m; r+ \( {% J8 C8 Z1 K/ B, M3 {% @9 y1 K" \6 h1 g. K. k
in whole different world. , p* @8 c" Y9 c" h$ ~6 ?9 ?% J$ F( }% E; P
1 k" \7 w2 K F E, d- {/ K 3 L3 Q5 j, ^& u7 V" D; l& i/ I5. What's broken with Unix?1 |' X6 W/ [2 T/ n/ S7 g
4 ?7 {8 k8 D# F7 \5 Q2 ]2 W' O0 @4 |
How would you fix it? ; x7 N. O" d* Z5 N9 n" _1 m & B! h8 c. r5 ] / V" X3 j+ A* z$ f5 C. L" Q0 a% U# _6 }0 C- l" h$ J# v
6. On your first day at Google, you discover 5 n% Q2 G% a8 R: r$ W- n& a \# @/ E; L* P
that your cubicle mate wrote the textbook3 ~* a/ s. Z+ X2 [. l
) w2 j8 S+ I0 ^) y9 |6 Pyou used as a primary resource in your first; r0 d# b: @3 U
, i8 s& X/ P' ~8 ]- c( u: Pyear of graduate school. Do you: & L$ R% N1 j1 ?$ ] g- ]5 @ K& c, e 8 n$ k2 ?+ ?8 @( d. m& }- _8 u9 c% {+ S* C( U
+ O* r) m. o v3 IA) Fawn obsequiously and ask if you7 |' d P2 A8 k: Z1 a/ S: Y% t) V K
( ?& o( {% M$ j* [0 o# n& m! {
can have an autograph. ) u9 l3 f2 Q7 |% Y% H 3 r i. F |" S/ A4 OB) Sit perfectly still and use only soft 0 @% [4 g0 Z n2 ], g / {9 Q& D3 P" |2 u5 F c0 Okeystrokes to avoid disturbing her4 h& v5 I0 o& w- T6 h
2 a& ~% J2 W+ Z, G' K+ |5 o
concentration.# E6 O N2 y) {4 h4 n, y2 u
. D2 K) s0 C# f4 H) GC) Leave her daily offerings of granola * j9 c' M+ V o( m; `7 l: x3 \! [7 y7 V' Q: K
and English toffee from the food bins.: ?, p8 x' c- j0 M- k8 ~( w1 @' L; t
- Q, z( n& b% M+ M
0 e0 P' ^0 _$ I5 w
0 i/ Z( {% g' k9 G! |( X! PD) Quote your favorite formula from the6 o# D, [& U4 N1 i
( b2 J2 B- D, J& }: X1 M+ Utextbook and explain how it's now4 ^8 j" C' z/ ]; c
6 v+ z4 I$ m0 b8 }6 w: S7 eyour mantra. 8 `# G# T6 L& O9 l: a 9 y& t& v: ^7 q' @9 a& JE) Show her how example 17b could 3 N/ p/ L' K f6 Y& d% ]5 |+ i! K4 ?# g5 y2 E9 W" U4 }! i
have been solved with 34 fewer lines) ]) b6 [& q7 Z0 e- X& w$ W2 k
( I5 h$ a3 t5 m5 ?, R- d
of code.5 a# |$ n3 `6 o% E& F
! W: n( K1 A6 H
7. Which of the following expresses Google 8 m9 Y( D8 y- i6 M + `. P! z) y4 p7 a+ `over-arching philosophy?5 a- c# p( N+ M$ t3 e% c
& Q g8 @6 q- I6 `4 e5 j$ i+ S5 J8 o, g* l7 I. w3 G1 w$ K( l) u; T& h
8 ?( a' d$ d! f- {1 `6 q9 m9 t
A) "I'm feeling lucky" $ u/ N3 F' v2 o6 q ! K- f# b9 O" M1 \9 d' t' }8 I# PB) "Don't be evil"6 T3 F `# p0 m! X; w2 h/ G
2 |- |1 v' ? m. N5 E& K
C) "Oh, I already fixed that" % k' j" c% b4 x5 h0 Z- G$ }1 U7 L& h$ T) k# H) p! p7 _7 R3 @
D) "You should never be more than % q1 l \7 {! o1 a- f+ C8 V& ~) I' w3 j m. N# O
50 feet from food" ! Z! s: j9 R0 u1 q ?6 d0 m6 R) N 2 G. V7 X4 J* ZE) All of the above ) s3 z7 |7 s, L) u6 s ' [" }& O6 {9 U: R Q/ ] B$ B+ T/ y- R4 J& f! T$ \( j9 P
; R0 C7 y' W; l* Z6 `8. How many different ways can you color an / S0 q7 `7 ^( s: Z4 P7 | 3 }. a( B( i" kicosahedron with one of three colors on% h1 ^$ B, m; |+ t1 ^
$ c/ D5 j6 W. D4 i3 R$ Heach face? ; k' U2 C. A3 m4 F O8 }( A& B9 Q& Z
8 {- o5 m* |) h! }) Y
, x+ j! u/ r c+ B0 EWhat colors would you choose? ) \7 @% H$ b1 I7 f % z! | g; [- s8 R( Y. q3 Q' E" I! Y# k, E. h) g7 W, I
* r/ { @ f. ?* G9 _$ W- u9. This space left intentionally blank. Please fill it1 ^' x3 I( x1 @1 R7 V! `
- v, @* H7 L7 |+ b4 wwith something that improves upon emptiness. & o3 ]' s @: ? ( h: q9 W2 H3 [9 [! j8 M( p! u/ A ( ]) ]1 K6 L+ m0 Y5 y# `3 C: h1 ~5 y. O0 k
10.On an infinite, two-dimensional, rectangular " ]( L- z9 {% D% k4 w% C3 Q% j8 r$ p( L; j7 _
lattice of 1-ohm resistors, what is the 0 v% X7 @2 k: k$ h! U, u% B . ^* s- b& V/ I9 b# jresistance between two nodes that are a4 j! I+ y( h0 V' J+ v, o8 A! z
1 v" {0 E! J. Z" f4 T D& i' `! D
knight's move away? 1 ?$ m; E8 }7 e ( @5 E+ y0 I( o% ]) K" o5 k: @. z# q, y2 H3 O, }- l& [
- j0 _" v3 k0 l) C" K% }
11.It's 2 PM on a sunny Sunday afternoon in the 4 T |8 O) _" G" Z5 G; J : p- s% m' l# e- nBay Area. You're minutes from the Pacific4 E3 V% v, Y0 d+ D% w# Q- F7 b5 t
J7 R) A- C' XOcean, redwood forest hiking trails and world. A) `: e; x" @8 _% }5 ~
2 w6 ?8 }, e7 y& I) gclass cultural attractions. What do you do? 4 i0 r% t2 C& _ # Q3 ~7 G* U- @1 @' ~0 l2 i. E; q, ^% `
& Q# ]$ V$ W( f4 L12.In your opinion, what is the most beautiful 8 C; ^5 @+ X0 d5 q& E % I9 J3 n3 H+ `; a+ o+ O1 Pmath equation ever derived? . t. t! f2 R+ p( ^* q% J! [- i! ?8 m+ k
2 ]; K: M# P, u3 K 2 e6 K/ A& w+ W2 E13. Which of the following is NOT an actual E/ p3 _& e4 p+ C/ _( ~; X% j" B 9 E8 w, `! E1 s+ S6 r! Einterest group formed by Google employees?6 ~$ ^1 z: M6 F8 ] c1 o$ U/ k" d
; n2 q. ^7 H) z# \ 5 y a$ d( q, y% m: J! r* `; F 9 G8 x/ G- z( f. GA. Women's basketball, J2 w$ X1 {2 ?4 W) A& V9 I
9 A+ A9 P/ ~5 d* |( FB. Buffy fans 1 k6 @' A) ?' Q2 n. @$ V' {, h! ?! Q, o9 B- b
C. Cricketeers 4 Q+ G! N# v; E : C$ ]! ?9 J' F1 I+ MD. Nobel winners9 h: Y$ D! a5 Q% I6 D0 ^
2 ^0 Z5 Q( [7 g$ y6 @" u& S
E. Wine club 1 _, H! X# R7 {8 d( Q$ r ] / N, V$ C% P" y/ w$ N: X " ~6 n( C- G6 g: R+ a# C& {/ z: E; W$ E' P
14.What will be the next great improvement in 5 u T" _$ z/ a8 u3 K % ^2 S( x- L( c9 D, t) ~search technology? ; Z& |" e6 H* @3 d9 Z$ I / a2 F0 g* ?% b5 Z0 l+ y 6 W$ }, X$ H, K( o" [+ y' q! a. _4 ~+ p$ |# h# C* J) k3 `8 w
15.What is the optimal size of a project team,. |+ o0 y* w% ~5 ~4 { c
5 V( z0 w1 M' u. x$ kabove which additional members do not $ f! N P4 q7 ^# o$ P" n: Y5 e5 A% H4 j# n. m: }8 f7 [
contribute productivity equivalent to the - E3 y) Y8 x" V) ^0 A) K' }- {$ Z! x2 y3 d: z
percentage increase in the staff size?& o0 O1 k. U+ p7 Z8 M4 b7 ^
7 g. @: `3 H2 W2 ~5 E3 j+ [
A) 1+ @# X# ^ e$ j, {$ p& a
0 a$ x$ M" a3 v% z# F4 y6 n- W6 Y
B) 3# M( a2 v& ?9 _- ~* }
) w0 l% e3 c$ m) wE) 24' \4 m; G2 e: D& S
% P' }( J7 N( F! N! i
6 ~2 Y2 |5 }) `0 @2 ^8 F! f ) G2 M; C+ Q) w: i2 E16.Given a triangle ABC, how would you use only( c; i7 G1 L" x
3 n1 g/ E" C# C+ Z- j. C" Y
a compass and straight edge to find a point P & j: f; [6 ?8 R8 H 6 I6 w, q. _2 L. v1 I( m7 Xsuch that triangles ABP, ACP and BCP have ; l. [; n) z+ Y# J5 N4 Y 7 H" u$ w' e9 D# kequal perimeters? (Assume that ABC is. |) }; y0 F1 [% N8 c" C3 V
! l( K3 l. ~* x! o
constructed so that a solution does exist.) , H5 W6 ]" A! l0 ~- s/ [9 ]. [/ j' |9 x! q5 I
1 L# p+ _* U# h3 a$ s- f
$ Q- h; D, A( w! M6 l17.Consider a function which, for a given whole % y& ?9 w& u/ I/ C1 i! v 7 Z# x1 @% f: tnumber n, returns the number of ones required. K- v }' c* X8 k4 W( p
; o5 x; \2 ?: Y o4 D
when writing out all numbers between 0 and n. ; \% }3 Y+ z. F4 w3 l _2 t/ T3 `& @5 J
For example, f(13)=6. Notice that f(1)=1. What! K+ X+ D5 t1 S- S8 T, V
) v3 e+ k' S- P1 bis the next largest n such that f(n)=n?* D" k* z2 O: ^
1 |/ W+ B- o, x3 }, e 7 j8 j K9 c# ? r$ t6 w- K9 y; k2 _' J. T
18.What's the coolest hack you've ever written?; a3 v5 Q! ^# e1 j4 Z
9 G* w& P, P5 j9 u+ Y - j, p% s0 a g8 P6 a" r8 q; a/ M5 e, I* L+ C- m; N
19.'Tis known in refined company, that choosing3 v+ i; G. a3 e' E0 ]0 T' k
8 H% o( a, ?) d# C0 H# E/ `, T- m# I6 z
K things out of N can be done in ways as / V( ]( _! Z1 r0 V9 h8 n7 y( p' V: Q0 P7 F
many as choosing N minus K from N: I pick K,6 E1 D5 j$ P% d
0 ~+ B' C/ j% M! T `* qyou the remaining.* |, ^9 S3 V. L
n% C* A: q0 {3 f. a) D' H , ^# u+ d' N" O5 c/ t, }$ f; M3 f. `* f1 f; J% v
Find though a cooler bijection, where you show 5 g) g3 z( }# M3 N' z @- O m 9 A2 v. M q4 ?3 W/ ya knack uncanny, of making your choices contain * |/ l' ~( X6 A& H& s 3 w8 F* X% g- Y. A' u8 S2 }0 yall K of mine. Oh, for pedantry: let K be no more$ r2 X7 w% c/ b( _$ |2 W- c* a# d6 q
; Z" U5 F: ?2 {9 Z( `
than half N.: ?' n# z& u& s( w, I t
' ^- m" b1 o; x& S! { 7 r# ~/ o# M; Q5 x! `9 j! X + w& V/ ~- A& W) r c20.What number comes next in the sequence:$ A5 |* X( G7 Q$ D: H9 Q
) R2 D& Q* U+ Y# S10, 9, 60, 90, 70, 66,? ; s) S2 \) p: I: O2 O5 X # J6 }& f6 Z6 z& [8 Q- H! `% ]. q 5 S4 ?/ U3 z: k E$ u/ K4 g( W, s. [
A)96 8 Q3 y5 o, i8 p; |1 I$ E, T- f [- } M+ |) |
B) 1000000000000000000000000000000000 ' N. Q! T# Z( F* P) W( F $ `- t3 R2 g: a+ s0 K; v. Z0000000000000000000000000000000000 . X" B/ L4 j1 h! Z" M% E% o 5 j% B, v6 @. [% N! R0000000000000000000000000000000003 X$ l; m4 l. ?8 `* E& t: _
& D9 k G6 i/ k& F8 x8 }$ mC) Either of the above# ~% j+ v! v( B+ H$ |
. X6 E8 w, x) b; ?% S' m# [+ z & P( l4 U0 R$ u$ G6 k, E: Z21.In 29 words or fewer, describe what you ) Z+ [+ o( A% N0 d* W% \( X3 _" x/ j" D2 w
would strive to accomplish if you worked% ?0 @) n' z0 y% q; f7 v3 Q