Ace Your Technical Interview Using Python
Erin Allard - PyCon 2019
bit.ly/erin-allard-pycon-2019
This talk is for you!
What should I study?
How can I feel more confident?
How can I do all this stuff using Python?
The next
25 minutes
Tech interview process
Personal qualities
Non-tech skills
CS concepts w/ Python
Mindset is key
A whirlwind of things you should probably study
Erin Allard
erin@empoweredengineers.com
The technical
interview process
Recruiter phone screen
Technical
phone screen with an engineer
Take-home assessment
Onsite interviews
Non-technical
skills matter
(a lot)
Problem solving
Ask good questions
“I’m trying to ____ but ____ is happening.
I already tried ____.
Can you point me in the right direction?”
See: How to Ask Good Questions
by Julia Evans
Understand assumptions
Code (obviously) matters
Collections
A fundamental way to
store and organize your data
Tuples
Lists
Dictionaries
Sets
What else can I do with these data types?
Poke around in the Python3 docs to find out!
Time complexity
The amount of time it takes to run an algorithm in the worst-case scenario, compared to the length of the input
0
100
200
300
400
500
600
700
800
900
1000
10
20
30
40
50
60
70
80
90
100
O(1)
O(logn)
O(n)
O(nlogn)
O(n2)
O(2n)
O(nl)
Operations
Elements
Big-O Complexity
O(1)
O(n)
O(log n)
O(n2)
Recursion
An elegant method of solving a problem where the solution depends on solutions to smaller occurrences of the same problem
Components of recursion
Base case
Progress
Al Sweigart, recursion hero!
Object-Oriented Programming
Classes and objects are everywhere
in production code
Object-Oriented Programming (OOP) in Python3 by RealPython.com
class Dog:
species = ‘canine’
def __init__(self, name):
self.name = name
Defining classes
and attributes
toby = Dog(‘Toby’)
toby.species
>>> ‘canine’’
toby.name
>>> ‘Toby’
Class attribute
Instance attribute
Class methods vs.
Instance methods
Encapsulation
Inheritance
Polymorphism
Data structures
Commonly used to assess
foundational CS knowledge
Problem Solving with Algorithms & Data Structures Using Python (PSADSUP)
By Brad Miller and David Ranum
Linear
data structures
Stacks
Last in, first out (LIFO)
Add and remove items in constant time
Preserve order of items
Queues
First in, first out (FIFO)
Add items in constant time
Remove items in linear time
Preserve order of items
Singly Linked List
‘apple’
False
87.5
Doubly Linked List
‘apple’
False
87.5
My Python courses on LinkedIn Learning
Python Data Structures: Stacks, Queues and Deques
Python Data Structures: Linked Lists
linkedin-learning.pxf.io/erin-pycon2019
Non-linear
data structures
Trees
2
7
5
2
6
5
9
4
11
Binary Search Trees
6
3
4
2
1
5
8
7
9
Graphs
B
E
C
D
F
A
Hash
maps
Sammy Lee
Mya Garcia
Jane Doe
0
1
2
3
13
14
15
521-8976
521-1234
521-9655
keys
hash function
buckets
Sorting algorithms
Commonly used to assess
foundational CS knowledge
4
4
3
2
2
2
1
1
1
3
3
4
3
3
3
2
2
2
2
2
2
4
4
3
3
3
3
10
10
10
10
10
10
4
4
4
12
12
12
12
12
12
10
5
5
1
1
1
1
1
1
12
10
6
5
5
5
5
5
5
5
12
10
6
6
6
6
6
6
6
6
12
Insertion sort
Merge sort
27
43
3
9
82
10
38
27
43
3
38
9
82
10
27
38
43
3
9
82
10
27
43
9
10
38
27
3
43
82
9
10
27
38
43
3
9
10
82
9
10
27
38
43
82
3
38
3
82
Quick sort
-3
5
2
3
9
2
-3
3
9
5
-3
2
5
9
-3
2
3
5
9
Searching algorithms
Commonly used to assess
foundational CS knowledge
Linear binary search
3
4
6
7
8
10
13
14
18
19
21
24
37
40
45
71
1
Binary search of trees
6
3
4
2
1
5
8
7
9
Breadth-first search
of trees
1
3
10
2
5
9
6
4
7
8
11
12
Depth-first search
of trees
1
7
5
2
3
4
6
8
9
10
11
12
Coding challenges: quality over quantity
Myth
“I need to spend all my study time doing coding challenges since I won’t get an offer unless I solve them perfectly.”
Reality #1
Coding challenges that stretch you
+
Studying CS concepts
-------------------------
Learn to approach a variety of problems
Reality #2
You can get offers even if you don’t finish a coding challenge!
But you need to demonstrate a lot of of other skills in the process.
Lots o’ ways to practice “Interview Python”
Do...
Work on problems that challenge you
Use the Internet to get unstuck
Be realistic about what your interviewer is expecting
Mindset is key
Failure and rejection
are part of the process
You don’t need every
company to want to hire you
Remember where we started!
You got this!
Erin Allard
erin@empoweredengineers.com
Could you have been a code breaker at Bletchley Park? (telegraph.co.uk)
Alan Turing was no crossword fiend (theguardian.com)