Professional Documents
Culture Documents
Paul Tyma
Get Notes : http://paultyma.blogspot.com
Software Development
March,2008
Who am I
Resume reviewer
Dotfuscator, Dasho
Mailinator.com
Copyright 2008, Paul Tyma
My (latest) experience
Weeks of research/studying
3 interviews
Copyright 2008, Paul Tyma
Startup Economics
Types of problems
Some on puzzles
What is it today?
Startup environment
10
11
Or maybe, this is largely for the same reason you remember your
elementary school gymnasium as utterly immense. As I get older,
it gets smaller.
Copyright 2008, Paul Tyma
12
13
Where
Google, Facebook, Slide, Admob
Management
Revenue
14
Strategy: Interviewing
Basics:
Be excited to be there
15
Strategy: Interviewing
Interviewer Mantra
Passionate
Friendly
16
Right now.
On the whiteboard.
th
17
Experiential:
Hardest Interview that I had
18
Startup Economics
(I have seen these numbers all deals vary)
CTO: 1 to 5%
Notes
19
20
21
22
Interview Questions
23
Language
Algorithms/Data Structures
24
Types of Questions
Philosophies
Testing, Agile
System Design
Design Patterns
OO Design
25
Language Questions
26
Languages
27
Languages
Java
J2EE gluer
API ninja
Language master
Bytecode twiddler
Copyright 2008, Paul Tyma
28
User
EJB
APIs
Language
Bytecode
VM
Copyright 2008, Paul Tyma
29
30
C/C++
Classic
Virtuality
Performance
Joel:
31
Guaranteed
live
object
32
Now, is B garbage?
GC runs
Destroys B
Guaranteed
live
object
33
Now, is B garbage?
GC runs
Destroys B
Guaranteed
live
object
34
35
Java final
simpleontheoutside,gooeyontheinside
Normal answers:
I've heard:
36
Java final
Deeper
37
Java final
local vars
// compiler error
38
Strategy: Languages
39
Strategy: Languages
Open source
40
41
Strategy: Philosophy
a language
42
Strategy: Philosophy
Stay Neutral
Unless....
43
Strategy: Systems
44
Strategy: Systems
Singleton
45
Algorithms
46
Running Times
(informal enough to make an algorithms professor wince)
Long Version:
47
Running Times
O(n^2)
O(n log n)
a car
or a tricycle
48
Running Times
O(n)
O(log n)
O(n log n)
O(n^2)
O(1)
O(2^n)
49
50
O(log n)
51
O(log n)
52
O(m)
Jane Smith
Fred Wilkins
Ravi Shankar
Bob Jones
Sam Bettson
Ned Ludd
53
O(m log n)
Jane Smith
Fred Wilkins
Ravi Shankar
Bob Jones
Sam Bettson
Ned Ludd
54
O(m^2)
Jane Smith, 18
Fred Wilkins, 20
Ravi Shankar, 19
Bob Jones, 21
Sam Bettson, 20
Ned Ludd, 22
55
O(n-2) = O(n)
56
Running Times
(one of my favorite questions)
57
Call sort()
n^2
Quicksort, etc.
n log n
58
Running Times
(same question!)
59
Running Times
n (linear sort)
10000
60
Running Times
correct is GOOD
which is gooder
61
Jane Smith, 18
Fred Wilkins, 20
Ravi Shankar, 19
Bob Jones, 21
Sam Bettson, 20
Ned Ludd, 22
62
n!
-----k! (n-k)!
Combination(age[20], 2)
O(age[20])
Add size(age[i])*size(age[(20-i)+20]))
O(m/2) = O(m)
Jane Smith, 18
Fred Wilkins, 20
Ravi Shankar, 19
Bob Jones, 21
Sam Bettson, 20
Ned Ludd, 22
63
Algorithm Strategy
64
Algorithm Strategy
Runtime relations
65
Algorithm Strategy
66
67
24
10
16
19
19
21
21
15
23
68
n*(n-1)*(n-2)*.....*1 = n^2
69
I hate these
luckily they are rare
70
How Many...
71
Surprisingly...
72
Surprisingly...
TRY
73
Strategy
2, 5, 10
74
Puzzle Questions
These stink....
Strategy
Whiteboard it
75
Summary
76
Question Evolution
77
Problem Evolution
Problem:
darn
78
Problem Evolution
Darnthatdog.Iwishhe'dstopchewingslippers
79
Problem Evolution
Average Case
80
Problem Evolution
* 4 to find
Searchforaaabin:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Copyright 2008, Paul Tyma
81
Interview question
Its practical
Assumptions:
82
In Java
publicbooleanisBadEmail(StringemailBody){
//let'signorecaseforsimplicity
if(emailBody.contains(darn)){
returntrue;
}
returnfalse;
}
83
Can we do Better?
Thatsillydog.Darnhimchewingmyslippers.
dddddddddddddddddarn<match!
84
Can we do Better?
Thatsillydog.Darnhimchewingmyslippers.
nnnnn
rn
arn
darn<match!
85
O(n)
worst: O(n*m)
O(n/m)
worst: O(n*m)
86
Problem Evolution
Average Case
the work !
Formally this is Boyer-Moore
Can we do any better?
Thatsillydog.Iwishhe'dstopchewing
slippers
Copyright 2008, Paul Tyma
87
Question Evolution
88
Problem Evolution
darn
durn
heck
Thatsillydog.Iwishhe'dstopchewing
slippers
89
Boyer-Moore
90
Problem Evolution
91
92
Boyer-Moore
Trie
93
Problem Summary
Often
94
References
Interview questions:
http://216.249.163.93/bob.pilgrim/445/order_of_complexity.html
http://www.sellsbrothers.com/fun/msiview/default.aspx?content=question.htm
Algorithms books
Sedgewick - http://www.cs.princeton.edu/~rs/
Joel's Write the code to find out if a point lies within a rectangle
95