20 pomo in total
elapsed: 6, +1
4:4:2 = coding:behavior:system
coding: 8 pomo
behavior: 8 pomo
system: 2 pomo
10 - 12 : 4 pomo
1 - 3 : 4 pomo
3-4 2 pomo
4-5 2 pomo
5-8 break: 저녁 식사 및 놀기
8-9 2 pomo
9-10 2 pomo
9:10 - 9:35
10-11 2 pomo
Design a network of vending machines where customers can collected their food items ordered on Amazon.com. Follow-up was to extend this system to enable suppliers to stock the vending machines. Focus was placed on high-level design, scalability, and details of the back-end system design. Also, each design decision had to be justified.
Design a game-controller to administer two games: Tic-Tac-Toe (traditional 3x3 board and a more generic mxn board) and Connect-4 (a generic mxn board). Focus was more on object-oriented design and the use of appropriate design patterns. The interviewer wanted to see various classes and their relationships, and some basic APIs to manage these games.
11-12 2 pomo
기출문제
# Space complexity: O(V + E) since we are storing all the prerequisites for each task in an adjacency list
def canFinish(self, N: int, prerequisites: List[List[int]]) -> bool:
# [x,y] : y is prerequsites for x
# 1. initialize the graph
in_degree = {i: 0 for i in range(N)} # incoming edges
graph = {i: [] for i in range(N)} # adjacency list
# 2. build a graph
for parent, child in prerequisites:
in_degree[child] += 1
graph[parent].append(child)
# 3. find all sources. all vertices with 0 in-degree
#print ('in_degree', in_degree)
sources = collections.deque()
for key in in_degree:
if in_degree[key] == 0:
sources.append(key)
# 4. detect cycle: whenever visit a node, decrement in_degree by 1.
# if any node's in_degree becomes negative, it would be a cycle.
#print ('sources', sources)
sorted_order = []
while sources:
key = sources.popleft()
sorted_order.append(key)
for child in graph[key]:
in_degree[child] -= 1
if in_degree[child] == 0:
sources.append(child)
return len(sorted_order) == N
class Solution:
def largestVariance(self, s: str) -> int:
# a := the w// higher freq
# b := the w// lower freq
def kadane(a: str, b: str) -> int:
ans = 0
countA = 0
countB = 0
canExtendPrevB = False
for c in s:
if c != a and c != b:
continue
if c == a:
countA += 1
else:
countB += 1
if countB > 0:
# an interval should contain at least one b
ans = max(ans, countA - countB)
elif countB == 0 and canExtendPrevB:
# edge case: consider previous b
ans = max(ans, countA - 1)
# reset if # of b > # of a
if countB > countA:
countA = 0
countB = 0
canExtendPrevB = True
return ans
return max(kadane(c1, c2)
for c1 in string.ascii_lowercase
for c2 in string.ascii_lowercase
if c1 != c2)
Grokking coding interview
use ok Heap
be specific
60 seconds
give number/data.
https://www.lewis-lin.com/blog/2018/6/13/lewis-c-lins-amazon-interview-spreadsheet
스프레드쉬트
Amz leadership principles, really general and the interviewer may ask you focus on some specific deatails when you talk about about the experience and project:
how to handle conflict
tight deadline
leadership in the team/project
what aspects would you improve if you do it again
"Strongly disagreed with your manager or peer"
"Tough or critical piece of feedback you received"
did you ever disagree with project manager?
The most important part for LP questions is, your answers should not be repeated. It looks redundant as the interviewer would have read your past feedback. This was a tip I received from the HR.
what's your biggest achievement?
how do you assess your current boss, which area he needs to improve.
How do you handle difference between you and your boss.
How do you hanle work pressure and how do you blance work and life.
https://dev.to/freeze_francis/amazon-sde-3-interview-3df6
The interview was with a Principle Product Manager and was completely behavioral. He asked the following:
situations where I worked on an ambiguous project.
situations where I had to convince the entire team to break the norm and do things differently.
Situations where you had to go beyond your comfort zone.
situations where you had to persuade your stakeholders to take a different approach.
situations where you disagreed with your team’s solution and convinced them with yours.
situations where you had to make a difficult decision.
situations where you had to agree with the team even though you disagreed.
Round 5. bar raiser
situations where you had a simple fix for a complex problem.
situations where you had an innovative idea that made its way to production.
QC, RN is in conflict situation? supporting is out of scope. consult with Google. give dettailed architecture to QC.
5.5 hour in total (11 pomo)
OK.1 3:50 - 4:15 survey existing system design questions
OK.2 4:20 - 4:45 survey
OK.3 4:50 - 5:15 survey: principle PM => completely behaviroal
break 50m
OK.4 6:10 - 6:35 survey & online bookstore
OK.5 Design Parking Garage : load balancer, read repliaca, SQL
OK.6 Cloud Engieering Interview Questions and Concepts :
OK 9:15 - 9:45 daily leetcode
break 9:50 - 10:15
10:00 - 10:25 tiny url, weather forecast system
10:30 - 10:55
11:00 - 11:25
https://brunch.co.kr/@worker-in-yvr/12
url 단축서비스
페이스북 친구의 게시물을 시간순으로 보기 위한 시스템
https://leetcode.com/discuss/interview-experience/1348383/Amazon-Rejection
Elevator system: asked to provide with the APIs. Tried to route the direction to elevator assignment + consistency+atomicity+sharding, he instead insisted on explaning the api flow.
https://dev.to/freeze_francis/amazon-sde-3-interview-3df6
System design: He asked to expose the above solution as a service and scale it to handle a large number of requests.
https://leetcode.com/discuss/interview-experience/2272462/Amazon-sde-2
Design BookMyShow using OO Principles and define classes, models etc
Design TinyUrl App
https://leetcode.com/discuss/interview-experience/1502893/Amazon-SDE2-Interview-Expericen
scaling for the parking lot ticketing system. Interviewer kept changing the requirement how to handle the ticketing system and added lots of use cases.
https://www.youtube.com/watch?v=gNQ9-kgyHfo&list=WL&index=8
https://leetcode.com/discuss/interview-experience/1128717/Amazon-SDE2-Bengaluru
design a system that could send email notifications in bulk. Focus was primarily on failure scenarios and handling.
https://leetcode.com/discuss/interview-experience/913583/Amazon-or-SDE2-or-REJECT
Asked me to design facebook.
HLD.
Why SQL DB?
How many DB boxes?
How will caching work?
Bottlenecks in the system?
CDN for photos, videos?
Asked me to design YOUTUBE.
Lots n lots of questions on CDN, permanent data stores, DB to be used, how will i make feed, updating the feed, asked me to wrtie Upload API and how it will work, how will it divide a big video file.
leedcode:amazon-onsite-interview-questions-sde-ii
Q.2: Design a network of vending machines where customers can collected their food items ordered on Amazon.com. Follow-up was to extend this system to enable suppliers to stock the vending machines. Focus was placed on high-level design, scalability, and details of the back-end system design. Also, each design decision had to be justified.
Q4: Design a game-controller to administer two games: Tic-Tac-Toe (traditional 3x3 board and a more generic mxn board) and Connect-4 (a generic mxn board). Focus was more on object-oriented design and the use of appropriate design patterns. The interviewer wanted to see various classes and their relationships, and some basic APIs to manage these games.
leetcode:AMAZON | Onsite | SDE-2
Design a highly scalable Movie Ticket Booking System
Amazon | SDE2 L5 | London, UK | Sep 2022 (Offer)
System Design Interview (30 mins) + Leadership Principles (20 mins):
Design a system to ingest IOT sensor data, store and display it
Behavioral question
Amz leadership principles, really general and the interviewer may ask you focus on some specific deatails when you talk about about the experience and project:
how to handle conflict
tight deadline
leadership in the team/project
what aspects would you improve if you do it again
SW II, level5
interview on CHIME(video)
SDEII L5
70% behavioral competency (all the interview rounds)
30% technical
I Vs We:
interview breakdown (4 rounds)
r1. coding-problem solving
r2. coding-data structures and algorithms
r3. coding-logical, maintainable and extensible code
r4. system design
언제/어떻게 쓰는 지가 더 중요.
more abstract. discover, design, demonstrate
70~80% candidates 가 실패. 질문 안함. requirement gathering 안함.
코딩 전 생각을 말하기. demonstrate your choice why.
design a large, highly distributed and highly scalable system
System Design: https://youtu.be/gNQ9-kgyHfo
Coding Sample (Whiteboard Environment): https://youtu.be/mjZpZ_wcYFg
Coding Sample (Virtual Environment): https://bit.ly/3G3aU19
Leadership Principles: https://youtu.be/CpcxVE5JIX4
SDE Candidate Interview FAQs: https://bit.ly/3BZz5er
results within 5 bussiness days
RHMD survey
No feedback positive/negative
can reapply in a year
ask your recruiter for help!
"I'm here to help"
coding test 난이도가 말이 안 되게 낮았으나 제대로 못 알아들어서 iteration 수를 줄이는 건데 time complexity 를 줄이라는 말인 줄 알고 한참동안 멍때림.. O(N)
을 어떻게 더 줄이지?
online accessment 에선 leetcode 기준으로 medium 과 hard 문제가 나와서 이번에도 그런 줄 알았는데 왜 저런 걸 물어보나 싶을 정도로 허무했지만, data structure 나 design, database 질문에서 제대로 답을 못해서 떨어질 것으로 예상.
전체적으로 영어를 못해서 의사소통이 지장이 있다는 느낌을 많이 줌. sorry one more time 만 열번 넘게 한 듯? ... 전화 영어 등록하자..
업데이트: 이상하지만 technical phone screen 보고 28시간 후 통과했다는 이메일옴. final virtual onsite interview 가 한국시각 아침7시부터 점심12시까지 5시간동안 진행예정이라고 함.