1 of 62

Ace Your Technical Interview Using Python

Erin Allard - PyCon 2019

bit.ly/erin-allard-pycon-2019

2 of 62

This talk is for you!

What should I study?

How can I feel more confident?

How can I do all this stuff using Python?

3 of 62

The next

25 minutes

Tech interview process

Personal qualities

Non-tech skills

CS concepts w/ Python

Mindset is key

4 of 62

A whirlwind of things you should probably study

5 of 62

Erin Allard

erin@empoweredengineers.com

  • SWE @ Heroku Support
  • LinkedIn Learning instructor
  • Hackbright grad & mentor
  • 1st time PyCon speaker!

6 of 62

7 of 62

The technical

interview process

8 of 62

Recruiter phone screen

9 of 62

Technical

phone screen with an engineer

10 of 62

Take-home assessment

11 of 62

Onsite interviews

12 of 62

Non-technical

skills matter

(a lot)

13 of 62

Problem solving

14 of 62

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

15 of 62

Understand assumptions

16 of 62

Code (obviously) matters

17 of 62

Collections

A fundamental way to

store and organize your data

18 of 62

Tuples

Lists

Dictionaries

Sets

19 of 62

What else can I do with these data types?

Poke around in the Python3 docs to find out!

20 of 62

Time complexity

The amount of time it takes to run an algorithm in the worst-case scenario, compared to the length of the input

21 of 62

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

22 of 62

O(1)

O(n)

O(log n)

O(n2)

23 of 62

Recursion

An elegant method of solving a problem where the solution depends on solutions to smaller occurrences of the same problem

24 of 62

Components of recursion

Base case

  • How will I know when I’m done recursing?

Progress

  • Continually reduce the problem until the base case is reached

25 of 62

Al Sweigart, recursion hero!

26 of 62

Object-Oriented Programming

Classes and objects are everywhere

in production code

27 of 62

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

28 of 62

Class methods vs.

Instance methods

29 of 62

Encapsulation

Inheritance

Polymorphism

30 of 62

Data structures

Commonly used to assess

foundational CS knowledge

31 of 62

Linear

data structures

32 of 62

Stacks

Last in, first out (LIFO)

Add and remove items in constant time

Preserve order of items

33 of 62

Queues

First in, first out (FIFO)

Add items in constant time

Remove items in linear time

Preserve order of items

34 of 62

Singly Linked List

‘apple’

False

87.5

35 of 62

Doubly Linked List

‘apple’

False

87.5

36 of 62

My Python courses on LinkedIn Learning

Python Data Structures: Stacks, Queues and Deques

Python Data Structures: Linked Lists

linkedin-learning.pxf.io/erin-pycon2019

37 of 62

Non-linear

data structures

38 of 62

Trees

2

7

5

2

6

5

9

4

11

39 of 62

Binary Search Trees

6

3

4

2

1

5

8

7

9

40 of 62

Graphs

B

E

C

D

F

A

41 of 62

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

42 of 62

Sorting algorithms

Commonly used to assess

foundational CS knowledge

43 of 62

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

44 of 62

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

45 of 62

Quick sort

-3

5

2

3

9

2

-3

3

9

5

-3

2

5

9

-3

2

3

5

9

46 of 62

Searching algorithms

Commonly used to assess

foundational CS knowledge

47 of 62

Linear binary search

3

4

6

7

8

10

13

14

18

19

21

24

37

40

45

71

1

48 of 62

Binary search of trees

6

3

4

2

1

5

8

7

9

49 of 62

Breadth-first search

of trees

1

3

10

2

5

9

6

4

7

8

11

12

50 of 62

Depth-first search

of trees

1

7

5

2

3

4

6

8

9

10

11

12

51 of 62

Coding challenges: quality over quantity

52 of 62

Myth

“I need to spend all my study time doing coding challenges since I won’t get an offer unless I solve them perfectly.”

53 of 62

Reality #1

Coding challenges that stretch you

+

Studying CS concepts

-------------------------

Learn to approach a variety of problems

54 of 62

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.

55 of 62

Lots o’ ways to practice “Interview Python”

HackerRank

LeetCode

Interview Cake

codewars

Pen & paper

Mini whiteboards

56 of 62

Do...

Work on problems that challenge you

Use the Internet to get unstuck

Be realistic about what your interviewer is expecting

57 of 62

Mindset is key

58 of 62

Failure and rejection

are part of the process

59 of 62

You don’t need every

company to want to hire you

60 of 62

Remember where we started!

61 of 62

You got this!

Erin Allard

erin@empoweredengineers.com

62 of 62