SlideShare a Scribd company logo
Demystifying
Software Interviews
Learnings from Being on Both Sides of the Table
Intro
Me - Michael Viveros:
• Sfwr Eng & Mgmt, 2017
• Software Engineer II, PagerDuty
• Interviewed dozens of candidates
You:
• Applying? Interviewing?
Live Walkthrough
Time Complexity
arr = [1, 2, 3]
for i in arr: # O(n)
print(i) # O(1)
# O(n * 1) = O(n)
# n = 3, a = [1, 2, 3], 3 iterations
# n = 4, a = [1, 2, 3, 4], 4 iterations
# n = 5, a = [1, 2, 3, 4, 5], 5 iterations
Time Complexity
arr = [1, 2, 3]
for i in arr: # O(n)
print(i) # O(1)
# O(n * 1) = O(n)
# n = 3, a = [1, 2, 3], 3 iterations
# n = 4, a = [1, 2, 3, 4], 4 iterations
# n = 5, a = [1, 2, 3, 4, 5], 5 iterations
Time Complexity
arr = [1, 2, 3]
for i in arr: # O(n)
print(i) # O(1)
# O(n * 1) = O(n)
# n = 3, a = [1, 2, 3], 3 iterations
# n = 4, a = [1, 2, 3, 4], 4 iterations
# n = 5, a = [1, 2, 3, 4, 5], 5 iterations
Time Complexity
arr = [1, 2, 3]
for i in arr: # O(n)
print(i) # O(1)
# O(n * 1) = O(n)
# n = 3, a = [1, 2, 3], 3 iterations
# n = 4, a = [1, 2, 3, 4], 4 iterations
# n = 5, a = [1, 2, 3, 4, 5], 5 iterations
Time Complexity
arr = [1, 2, 3]
for i in arr: # O(n)
for j in arr: # O(n)
print(i, j)
# O(n * n) = O(n^2)
# n = 3, a = [1, 2, 3], 9 iterations
# n = 4, a = [1, 2, 3, 4], 16 iterations
# n = 5, a = [1, 2, 3, 4, 5], 25 iterations
Time Complexity
arr = [1, 2, 3]
for i in arr: # O(n)
for j in arr: # O(n)
print(i, j)
# O(n * n) = O(n^2)
# n = 3, a = [1, 2, 3], 9 iterations
# n = 4, a = [1, 2, 3, 4], 16 iterations
# n = 5, a = [1, 2, 3, 4, 5], 25 iterations
Time Complexity
arr = [1, 2, 3]
for i in arr: # O(n)
for j in arr: # O(n)
print(i, j)
# O(n * n) = O(n^2)
# n = 3, a = [1, 2, 3], 9 iterations
# n = 4, a = [1, 2, 3, 4], 16 iterations
# n = 5, a = [1, 2, 3, 4, 5], 25 iterations
Time Complexity
arr = [1, 2, 3]
for i in arr: # O(n)
for j in arr: # O(n)
print(i, j)
# O(n * n) = O(n^2)
# n = 3, a = [1, 2, 3], 9 iterations
# n = 4, a = [1, 2, 3, 4], 16 iterations
# n = 5, a = [1, 2, 3, 4, 5], 25 iterations
Time Complexity
arr = [1, 2, 3]
num = 5
for i in x:
if i == num:
return True
# O(n)
dict = {1: 10, 2: 20}
num = 5
return num in dict
# O(1)
Time Complexity
arr = [1, 2, 3]
num = 5
for i in x:
if i == num:
return True
# O(n)
dict = {1: 10, 2: 20}
num = 5
return num in dict
# O(1)
Space Complexity
arr = [2, 1, 3]
minNum = 100
for num in arr:
if num < minNum:
minNum = num
return minNum
# O(1)
arr = [2, 1, 3]
arrSorted = sorted(arr)
return arrSorted[0]
# O(n)
Space Complexity
arr = [2, 1, 3]
minNum = 100
for num in arr:
if num < minNum:
minNum = num
return minNum
# O(1)
arr = [2, 1, 3]
arrSorted = sorted(arr)
return arrSorted[0]
# O(n)
Ask Questions
# Design an algorithm to print all pairs of integers
# within an array which sum to a specified value.
#
# Input: a = [1, 1, 3], sum = 4
# Output: [1, 3]
#
# Input: a = [ 2, 3, 4, 7, 8 ], sum = 10
# Output: [3, 7], [2, 8]
Start Simple, Then Optimize
# O(n^2)
for numI in arr:
for numJ in arr:
if numI + numJ == x:
# O(n)
for numI in arr:
numJ = x - numI
if numJ in occurrences:
Start Simple, Then Optimize
# O(n^2)
for numI in arr:
for numJ in arr:
if numI + numJ == x:
# O(n)
for numI in arr:
numJ = x - numI
if numJ in occurrences:
Use Google
Don't Freeze, COMMUNICATE!
$ python walkthrough.py
[[1, 3], [1, 3], [3, 1], [3, 1]]
$ python walkthrough.py
...
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'
Don't Freeze, COMMUNICATE!
$ python walkthrough.py
[[1, 3], [1, 3], [3, 1], [3, 1]]
$ python walkthrough.py
...
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'
Add Print Statements
print(arr)
for i in range(len(arr)):
numI = arr[i]
for j in range(len(arr)):
numJ = arr[j]
if numI + numJ == x:
print(f"found pair - i {i}, j {j}, numI {numI}, numJ {numJ}")
Analyze Time and Space
Complexity
print(arr)
pairs = []
# time - O(n^2), space - O(n)
for i in range(len(arr)): # O(n)
numI = arr[i]
for j in range(len(arr)): # O(n)
numJ = arr[j]
if numI != None and numJ != None and numI + numJ == x:
Incremental Approach
occurrences = {}
for num in arr:
if num not in occurrences:
occurrences[num] = 1
else:
occurrences[num] += 1
# pairs = []
# for numI in arr:
Other Tips
• Pick the language you're most comfortable with
• Don't worry if you don't finish
• PRACTICE!
Resources
Resources
• Mock Interviews
• Wed/Thurs Jan 15/16, evenings
• Hackerrank contest
• Slack mobile app
• Workspace - macinterviews.slack.com
Pagerduty
• Hiring summer interns!
• Perks:
• Catered lunch
• Downtown Toronto
• Interns are FULL members of the team
• pagerduty.com/careers

More Related Content

What's hot

Newton's method for MATLAB Code
Newton's method for MATLAB CodeNewton's method for MATLAB Code
Newton's method for MATLAB Code
Taimoor Muzaffar Gondal
 
เซต
เซตเซต
เซต
Khiaokha
 
Fibez spoj
Fibez spojFibez spoj
Fibez spoj
Vivek Rathi
 
Alg1 review of writing equations of lines
Alg1 review of writing equations of linesAlg1 review of writing equations of lines
Alg1 review of writing equations of lines
Carol Defreese
 
งาน 9
งาน 9งาน 9
งาน 9
Areeya Onnom
 
133467 compiladores 4.pdf
133467 compiladores 4.pdf133467 compiladores 4.pdf
133467 compiladores 4.pdf
Benjamín Joaquín Martínez
 
Algebra review 1.1 3
Algebra review 1.1   3Algebra review 1.1   3
Algebra review 1.1 3
Kristen Fouss
 
งาน 9 อังสนา
งาน 9 อังสนางาน 9 อังสนา
งาน 9 อังสนา
Areeya Onnom
 
งาน 9
งาน 9งาน 9
งาน 9
Areeya Onnom
 
4 ESO Academics - Unit 01 - Exercises 1.3.
4 ESO Academics - Unit 01 - Exercises 1.3.4 ESO Academics - Unit 01 - Exercises 1.3.
4 ESO Academics - Unit 01 - Exercises 1.3.
Gogely The Great
 
Completing the square class notes
Completing the square   class notesCompleting the square   class notes
Completing the square class notes
Steven Jackson
 
Nader K. Rad: P3.express: Minimalism in Project Management
Nader K. Rad: P3.express: Minimalism in Project ManagementNader K. Rad: P3.express: Minimalism in Project Management
Nader K. Rad: P3.express: Minimalism in Project Management
Lviv Startup Club
 
133467 p2a2
133467 p2a2133467 p2a2
งาน 9
งาน 9งาน 9
งาน 9
Areeya Onnom
 
Geom 9point2
Geom 9point2Geom 9point2
Geom 9point2
herbison
 
Computing the Area of a Polygon
Computing the Area of a PolygonComputing the Area of a Polygon
Computing the Area of a Polygon
Kasun Ranga Wijeweera
 
Higher Order Procedures (in Ruby)
Higher Order Procedures (in Ruby)Higher Order Procedures (in Ruby)
Higher Order Procedures (in Ruby)
Nate Murray
 
Conformal mapping
Conformal mappingConformal mapping
Conformal mapping
Prashant376709
 
Alg1 lesson 4-3
Alg1 lesson 4-3Alg1 lesson 4-3
Alg1 lesson 4-3
Carol Defreese
 

What's hot (19)

Newton's method for MATLAB Code
Newton's method for MATLAB CodeNewton's method for MATLAB Code
Newton's method for MATLAB Code
 
เซต
เซตเซต
เซต
 
Fibez spoj
Fibez spojFibez spoj
Fibez spoj
 
Alg1 review of writing equations of lines
Alg1 review of writing equations of linesAlg1 review of writing equations of lines
Alg1 review of writing equations of lines
 
งาน 9
งาน 9งาน 9
งาน 9
 
133467 compiladores 4.pdf
133467 compiladores 4.pdf133467 compiladores 4.pdf
133467 compiladores 4.pdf
 
Algebra review 1.1 3
Algebra review 1.1   3Algebra review 1.1   3
Algebra review 1.1 3
 
งาน 9 อังสนา
งาน 9 อังสนางาน 9 อังสนา
งาน 9 อังสนา
 
งาน 9
งาน 9งาน 9
งาน 9
 
4 ESO Academics - Unit 01 - Exercises 1.3.
4 ESO Academics - Unit 01 - Exercises 1.3.4 ESO Academics - Unit 01 - Exercises 1.3.
4 ESO Academics - Unit 01 - Exercises 1.3.
 
Completing the square class notes
Completing the square   class notesCompleting the square   class notes
Completing the square class notes
 
Nader K. Rad: P3.express: Minimalism in Project Management
Nader K. Rad: P3.express: Minimalism in Project ManagementNader K. Rad: P3.express: Minimalism in Project Management
Nader K. Rad: P3.express: Minimalism in Project Management
 
133467 p2a2
133467 p2a2133467 p2a2
133467 p2a2
 
งาน 9
งาน 9งาน 9
งาน 9
 
Geom 9point2
Geom 9point2Geom 9point2
Geom 9point2
 
Computing the Area of a Polygon
Computing the Area of a PolygonComputing the Area of a Polygon
Computing the Area of a Polygon
 
Higher Order Procedures (in Ruby)
Higher Order Procedures (in Ruby)Higher Order Procedures (in Ruby)
Higher Order Procedures (in Ruby)
 
Conformal mapping
Conformal mappingConformal mapping
Conformal mapping
 
Alg1 lesson 4-3
Alg1 lesson 4-3Alg1 lesson 4-3
Alg1 lesson 4-3
 

Similar to Demystifying Software Interviews

Lecture 3.1 python loop 1 (ewurc)
Lecture 3.1 python loop 1 (ewurc)Lecture 3.1 python loop 1 (ewurc)
Lecture 3.1 python loop 1 (ewurc)
Al-Mamun Riyadh (Mun)
 
ECE-PYTHON.docx
ECE-PYTHON.docxECE-PYTHON.docx
ECE-PYTHON.docx
Chaithanya89350
 
Course notes on Astronomical data analysis by python pdf
Course notes on Astronomical data analysis by python pdfCourse notes on Astronomical data analysis by python pdf
Course notes on Astronomical data analysis by python pdf
ZainRahim3
 
Python Numpy Source Codes
Python Numpy Source CodesPython Numpy Source Codes
Python Numpy Source Codes
Amarjeetsingh Thakur
 
Python for High School Programmers
Python for High School ProgrammersPython for High School Programmers
Python for High School Programmers
Siva Arunachalam
 
intro_to_python_20150825
intro_to_python_20150825intro_to_python_20150825
intro_to_python_20150825
Shung-Hsi Yu
 
Recursion in C
Recursion in CRecursion in C
Recursion in C
Lakshmi Sarvani Videla
 
Presentation2
Presentation2Presentation2
Presentation2
chian2208
 
Thinking Functionally In Ruby
Thinking Functionally In RubyThinking Functionally In Ruby
Thinking Functionally In Ruby
Ross Lawley
 
Datastructure tree
Datastructure treeDatastructure tree
Datastructure tree
rantd
 
Algorithms with-java-1.0
Algorithms with-java-1.0Algorithms with-java-1.0
Algorithms with-java-1.0
BG Java EE Course
 
Intoduction to numpy
Intoduction to numpyIntoduction to numpy
Intoduction to numpy
Faraz Ahmed
 
Practicle 1.docx
Practicle 1.docxPracticle 1.docx
Practicle 1.docx
GaneshPawar819187
 
pradeepbishtLecture13 div conq
pradeepbishtLecture13 div conqpradeepbishtLecture13 div conq
pradeepbishtLecture13 div conq
Pradeep Bisht
 
re3 - modern regex syntax with a focus on adoption
re3 - modern regex syntax with a focus on adoptionre3 - modern regex syntax with a focus on adoption
re3 - modern regex syntax with a focus on adoption
Aur Saraf
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
Dr. Rajdeep Chatterjee
 
NumPy_Broadcasting Data Science - Python.pptx
NumPy_Broadcasting Data Science - Python.pptxNumPy_Broadcasting Data Science - Python.pptx
NumPy_Broadcasting Data Science - Python.pptx
JohnWilliam111370
 
Time complexity.ppt
Time complexity.pptTime complexity.ppt
Time complexity.ppt
YekoyeTigabuYeko
 
Python Fundamentals - Basic
Python Fundamentals - BasicPython Fundamentals - Basic
Python Fundamentals - Basic
Wei-Yuan Chang
 
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
nassorokayanda9412
 

Similar to Demystifying Software Interviews (20)

Lecture 3.1 python loop 1 (ewurc)
Lecture 3.1 python loop 1 (ewurc)Lecture 3.1 python loop 1 (ewurc)
Lecture 3.1 python loop 1 (ewurc)
 
ECE-PYTHON.docx
ECE-PYTHON.docxECE-PYTHON.docx
ECE-PYTHON.docx
 
Course notes on Astronomical data analysis by python pdf
Course notes on Astronomical data analysis by python pdfCourse notes on Astronomical data analysis by python pdf
Course notes on Astronomical data analysis by python pdf
 
Python Numpy Source Codes
Python Numpy Source CodesPython Numpy Source Codes
Python Numpy Source Codes
 
Python for High School Programmers
Python for High School ProgrammersPython for High School Programmers
Python for High School Programmers
 
intro_to_python_20150825
intro_to_python_20150825intro_to_python_20150825
intro_to_python_20150825
 
Recursion in C
Recursion in CRecursion in C
Recursion in C
 
Presentation2
Presentation2Presentation2
Presentation2
 
Thinking Functionally In Ruby
Thinking Functionally In RubyThinking Functionally In Ruby
Thinking Functionally In Ruby
 
Datastructure tree
Datastructure treeDatastructure tree
Datastructure tree
 
Algorithms with-java-1.0
Algorithms with-java-1.0Algorithms with-java-1.0
Algorithms with-java-1.0
 
Intoduction to numpy
Intoduction to numpyIntoduction to numpy
Intoduction to numpy
 
Practicle 1.docx
Practicle 1.docxPracticle 1.docx
Practicle 1.docx
 
pradeepbishtLecture13 div conq
pradeepbishtLecture13 div conqpradeepbishtLecture13 div conq
pradeepbishtLecture13 div conq
 
re3 - modern regex syntax with a focus on adoption
re3 - modern regex syntax with a focus on adoptionre3 - modern regex syntax with a focus on adoption
re3 - modern regex syntax with a focus on adoption
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
 
NumPy_Broadcasting Data Science - Python.pptx
NumPy_Broadcasting Data Science - Python.pptxNumPy_Broadcasting Data Science - Python.pptx
NumPy_Broadcasting Data Science - Python.pptx
 
Time complexity.ppt
Time complexity.pptTime complexity.ppt
Time complexity.ppt
 
Python Fundamentals - Basic
Python Fundamentals - BasicPython Fundamentals - Basic
Python Fundamentals - Basic
 
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
 

Recently uploaded

ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
kalichargn70th171
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Peter Caitens
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
anfaltahir1010
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 

Recently uploaded (20)

ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLESINTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
INTRODUCTION TO AI CLASSICAL THEORY TARGETED EXAMPLES
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 

Demystifying Software Interviews

  • 1. Demystifying Software Interviews Learnings from Being on Both Sides of the Table
  • 2.
  • 3. Intro Me - Michael Viveros: • Sfwr Eng & Mgmt, 2017 • Software Engineer II, PagerDuty • Interviewed dozens of candidates You: • Applying? Interviewing?
  • 5. Time Complexity arr = [1, 2, 3] for i in arr: # O(n) print(i) # O(1) # O(n * 1) = O(n) # n = 3, a = [1, 2, 3], 3 iterations # n = 4, a = [1, 2, 3, 4], 4 iterations # n = 5, a = [1, 2, 3, 4, 5], 5 iterations
  • 6. Time Complexity arr = [1, 2, 3] for i in arr: # O(n) print(i) # O(1) # O(n * 1) = O(n) # n = 3, a = [1, 2, 3], 3 iterations # n = 4, a = [1, 2, 3, 4], 4 iterations # n = 5, a = [1, 2, 3, 4, 5], 5 iterations
  • 7. Time Complexity arr = [1, 2, 3] for i in arr: # O(n) print(i) # O(1) # O(n * 1) = O(n) # n = 3, a = [1, 2, 3], 3 iterations # n = 4, a = [1, 2, 3, 4], 4 iterations # n = 5, a = [1, 2, 3, 4, 5], 5 iterations
  • 8. Time Complexity arr = [1, 2, 3] for i in arr: # O(n) print(i) # O(1) # O(n * 1) = O(n) # n = 3, a = [1, 2, 3], 3 iterations # n = 4, a = [1, 2, 3, 4], 4 iterations # n = 5, a = [1, 2, 3, 4, 5], 5 iterations
  • 9. Time Complexity arr = [1, 2, 3] for i in arr: # O(n) for j in arr: # O(n) print(i, j) # O(n * n) = O(n^2) # n = 3, a = [1, 2, 3], 9 iterations # n = 4, a = [1, 2, 3, 4], 16 iterations # n = 5, a = [1, 2, 3, 4, 5], 25 iterations
  • 10. Time Complexity arr = [1, 2, 3] for i in arr: # O(n) for j in arr: # O(n) print(i, j) # O(n * n) = O(n^2) # n = 3, a = [1, 2, 3], 9 iterations # n = 4, a = [1, 2, 3, 4], 16 iterations # n = 5, a = [1, 2, 3, 4, 5], 25 iterations
  • 11. Time Complexity arr = [1, 2, 3] for i in arr: # O(n) for j in arr: # O(n) print(i, j) # O(n * n) = O(n^2) # n = 3, a = [1, 2, 3], 9 iterations # n = 4, a = [1, 2, 3, 4], 16 iterations # n = 5, a = [1, 2, 3, 4, 5], 25 iterations
  • 12. Time Complexity arr = [1, 2, 3] for i in arr: # O(n) for j in arr: # O(n) print(i, j) # O(n * n) = O(n^2) # n = 3, a = [1, 2, 3], 9 iterations # n = 4, a = [1, 2, 3, 4], 16 iterations # n = 5, a = [1, 2, 3, 4, 5], 25 iterations
  • 13. Time Complexity arr = [1, 2, 3] num = 5 for i in x: if i == num: return True # O(n) dict = {1: 10, 2: 20} num = 5 return num in dict # O(1)
  • 14. Time Complexity arr = [1, 2, 3] num = 5 for i in x: if i == num: return True # O(n) dict = {1: 10, 2: 20} num = 5 return num in dict # O(1)
  • 15. Space Complexity arr = [2, 1, 3] minNum = 100 for num in arr: if num < minNum: minNum = num return minNum # O(1) arr = [2, 1, 3] arrSorted = sorted(arr) return arrSorted[0] # O(n)
  • 16. Space Complexity arr = [2, 1, 3] minNum = 100 for num in arr: if num < minNum: minNum = num return minNum # O(1) arr = [2, 1, 3] arrSorted = sorted(arr) return arrSorted[0] # O(n)
  • 17. Ask Questions # Design an algorithm to print all pairs of integers # within an array which sum to a specified value. # # Input: a = [1, 1, 3], sum = 4 # Output: [1, 3] # # Input: a = [ 2, 3, 4, 7, 8 ], sum = 10 # Output: [3, 7], [2, 8]
  • 18. Start Simple, Then Optimize # O(n^2) for numI in arr: for numJ in arr: if numI + numJ == x: # O(n) for numI in arr: numJ = x - numI if numJ in occurrences:
  • 19. Start Simple, Then Optimize # O(n^2) for numI in arr: for numJ in arr: if numI + numJ == x: # O(n) for numI in arr: numJ = x - numI if numJ in occurrences:
  • 21. Don't Freeze, COMMUNICATE! $ python walkthrough.py [[1, 3], [1, 3], [3, 1], [3, 1]] $ python walkthrough.py ... TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'
  • 22. Don't Freeze, COMMUNICATE! $ python walkthrough.py [[1, 3], [1, 3], [3, 1], [3, 1]] $ python walkthrough.py ... TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'
  • 23. Add Print Statements print(arr) for i in range(len(arr)): numI = arr[i] for j in range(len(arr)): numJ = arr[j] if numI + numJ == x: print(f"found pair - i {i}, j {j}, numI {numI}, numJ {numJ}")
  • 24. Analyze Time and Space Complexity print(arr) pairs = [] # time - O(n^2), space - O(n) for i in range(len(arr)): # O(n) numI = arr[i] for j in range(len(arr)): # O(n) numJ = arr[j] if numI != None and numJ != None and numI + numJ == x:
  • 25. Incremental Approach occurrences = {} for num in arr: if num not in occurrences: occurrences[num] = 1 else: occurrences[num] += 1 # pairs = [] # for numI in arr:
  • 26. Other Tips • Pick the language you're most comfortable with • Don't worry if you don't finish • PRACTICE!
  • 28.
  • 29.
  • 30. Resources • Mock Interviews • Wed/Thurs Jan 15/16, evenings • Hackerrank contest • Slack mobile app • Workspace - macinterviews.slack.com
  • 31. Pagerduty • Hiring summer interns! • Perks: • Catered lunch • Downtown Toronto • Interns are FULL members of the team • pagerduty.com/careers