Strive to Be Earth’s Best Employer(力争成为全球最佳雇主)
领导者关心员工的幸福和发展,致力于创造一个安全、包容和充满支持的工作环境。
Success and Scale Bring Broad Responsibility(成功与规模带来广泛的责任)
领导者意识到,随着公司规模的扩大,他们对社会、环境和未来世代的影响也越来越大。领导者必须保持谦逊,积极承担责任,做出积极改变。
OA
Fitness tracker (NG OA)
A user is using the Amazon fitness tracker, and they are engaged in a jumping exercise routine. The user is positioned on the ground, and there are n stones, each placed at different heights. The height of theith stone is represented by height[i] meters.
The goal is to maximize the calorie burn during this exercise, and the calories burned when jumping from theith stone to the jth stone is calculated as (height[i] - height[j]) ^2.
The user intends to practice jumping on each stone exactly once but can choose the order in which they jump. Since the user is looking to optimize their calorie burn for this single session, the task is to determine the maximum amount of calories that can be burned during the exercise.
Formally, given an array height of size n, representing the height of each stone, find the maximum amount of calories the user can burn.
Note that the user can jump from any stone to any stone, and the ground’s height is 0 and once user jumps to stone from ground, he/she can never go back to ground.
The subarray must contain the series1 and series2 and having the smallest number of distinct values is [1, 2, 2, 2, 5], so return 3,
the number of distinct integers in this subarray.
Case2:
array = [1, 3, 2, 1, 4] series1 = 1 series2 = 2
The shortest subarray contains both series1 and series2 is [2, 1], so we return 2, the number of distinct values in this subarray.
Case3:
array = [3, 1, 2] series1 = 1 and series2 = 1
because series1 and series2 are the same, so if the array contains series1, that would be good. This array contains series1, so we return 1.
Case4:
array = [2, 4, 9] series1 = 1 and series2 = 1
because series1 and series2 are the same, but this array doesn’t contain series1, so we return 0.
You are analyzing the market trends of Amazon stocks. An AWS financial service model returned an array of integers, PnL (Profit and Loss), for your portfolio representing that in the ith month, you will either gain or lose PnL[i]. All reported PnL values are positive, representing gains.
As part of the analysis, you will perform the following operation on the PnL array any number of times:
Choose any month (0 ≤ i < n) and multiply PnL[i] by -1
Find the maximum number of months you can afford to face a loss, i.e., have a negative PnL, such that the cumulative PnL for each of the n months remains strictly positive i.e. remains greater than 0.
Note: The cumulative PnL for the ith month is defined as the sum of PnL from the starting month up to the ith month. For example, the cumulative PnL for the PnL = [3, -2, 5, -6, 1] is [3, 1, 6, 0, 1].
publicintmaximizeNegativePnLMonths(int[] PnL) { return maximizeNegativePnLMonthsRecursive(PnL, 0, 0, 0); } privateintmaximizeNegativePnLMonthsRecursive(int[] PnL, int index, int cumulativeSum, int negativeMonths) { // Base case: if all months are processed, return the count of negative months if (index == PnL.length) { return negativeMonths; } // Option 1: Leave the PnL as is and move to the next month intmaxNegativeMonths= maximizeNegativePnLMonthsRecursive(PnL, index + 1, cumulativeSum + PnL[index], negativeMonths); // Option 2: Flip the sign of the PnL for the current month if it does not make the cumulative sum non-positive if (cumulativeSum - PnL[index] > 0) { // Check if flipping won't result in a non-positive cumulative sum maxNegativeMonths = Math.max(maxNegativeMonths, maximizeNegativePnLMonthsRecursive(PnL, index + 1, cumulativeSum - PnL[index], negativeMonths + 1)); } return maxNegativeMonths; }
public int maximizeNegativePnLMonths(int[] PnL) { return maximizeNegativePnLMonthsRecursive(PnL, 0, 0, 0); } private int maximizeNegativePnLMonthsRecursive(int[] PnL, int index, int cumulativeSum, int negativeMonths) { // Base case: if all months are processed, return the count of negative months if (index == PnL.length) { return negativeMonths; } // Option 1: Leave the PnL as is and move to the next month int maxNegativeMonths = maximizeNegativePnLMonthsRecursive(PnL, index + 1, cumulativeSum + PnL[index], negativeMonths); // Option 2: Flip the sign of the PnL for the current month if it does not make the cumulative sum non-positive if (cumulativeSum - PnL[index] > 0) { // Check if flipping won't result in a non-positive cumulative sum maxNegativeMonths = Math.max(maxNegativeMonths, maximizeNegativePnLMonthsRecursive(PnL, index + 1, cumulativeSum - PnL[index], negativeMonths + 1)); } return maxNegativeMonths; }
smallest palindromes (NG OA)
Amazon’s software team utilizes several algorithms to maintain data integrity, one of which targets the encoding of symmetrical names. Symmetrical names are unique in that they read identically in both directions, similar to palindromes in language parlance.
The chief aim of the algorithm is to rearrange the characters in the original symmetrical name according to these criteria:
• The rearranged name is a reshuffled version of the original symmetrical name.
• The restructured name should be symmetrical as well.
• This restructured name should be lexicographically smallest among all its symmetric permutations.
Given an initial symmetrical name that contains only lowercase English characters, compute the encoded name.
A string s is considered to be lexicographically smaller than the string t of the same length if the first character in s that differs from that in t is smaller. For example, “abcd” is lexicographically smaller than “abdc” but larger than “abad”
Note that the output encoded name could match the original name if it’s already the smallest lexicographically.
Example
The original string is nameString = “babab”.
This can be reversed to give “abbba”, which is a symmetric rearrangement of the original symmetrical name and is the smallest possible reverse order.
It satisfies all the requirements so return the string abbba.
Function Description
Complete the function computeEncodedProductName in the editor below.
题目理解
给一个string
要给出一个 palindrome string
the string must be the smallest string based on lexicographical order
Eg:
babab —> a bbb a
破题点
统计每个char的freq
如果是palindrome string
freq of char must be two cases:
all even
even + one odd case
genome sequencing (NG OA)
Data scientists at Amazon are working on a utility for genome sequencing algorithms. The utility finds anagram patterns in a pair of DNA sequence strings. A pair of DNA is special if they are anagrams after removing any number of occurrences of at most one character from each DNA sequence.
Given n pairs of DNA, for each pair, attempt to make them anagrams. Return a list of boolean values, one for each pair, where True means a pair is special.
Example
Given, n = 1, pair and strings dna1 = “safddadfs” and dna2 = “famafmss”.
The strings are anagrams after removing all the occurrences of character d from s and character'm from t. Return [True].
Note: It is not required that all instances of a character be removed. For example, given aab and ba, one a can be removed from aab to leave ab.
Function Description
Complete the function getSequence in the editor below.
getSequence has the following parameter(s):
string dna [n] [2] the pairs of DNA sequences.
Returns
bool[n]: true if the pair is special, and false otherwise.
Removing all occurrences of 'd' from dna1 and 'm' from dna2 —> makes the strings anagrams.
破提点
遍历 s 和 t,统计每个char的freq 到 letters[26]中
遍历两个 letters[26] 出现differece,就count++
如果count > 2 那么return false
genome sequencing algorithms
Data scientists at Amazon are working on a utility for genome sequencing algorithms. The utility finds anagram patterns in a pair of DNA sequence strings. A pair of DNA is special if they are anagrams after removing any number of occurrences of at most one character from each DNA sequence.
Given n pairs of DNA, for each pair, attempt to make them anagrams. Return a list of boolean values, one for each pair, where True means a pair is special.
getOperation (全职)
There are n processes. The ith process has resource[i] number of resources. All the resource[i] are distinct. The CPU wants the processes to be arranged in increasing order of their resource[i].
The CPU does several operations to get this.
In each operation, the CPU selects an integer x and a process with number of resources = x.
It then places all processes with resource values less than x before the processes with resource values greater than or equal to x, maintaining their original order.
i.e.
the relative order between processes having resource value less than x should be maintained and the same applies for processes having resource value greater than or equal to x.
Find the lexicographically smallest sequence of x that the CPU chooses, such that it takes the minimum number of operations to complete the task.
Note: If the minimum number of operations = 0, then return -1.
publicstatic List<Integer> getOperations(List<Integer> resource) { // Creates array, arr[0] is the value of resource, arr[1] is the index. int[][] arr = newint[resource.size()][2]; for(inti=0; i < resource.size(); i++) { arr[i][0] = resource.get(i); arr[i][1] = i; } Arrays.sort(arr, Comparator.comparingInt(a -> a[0])); // Sorts the array by value. List<Integer> result = newArrayList<>(); for(inti=1; i < arr.length; i++) { // If the index of the larger number is before the smaller one, we will select this number. if(arr[i][1] < arr[i - 1][1]) { result.add(arr[i][0]); } } if(result.isEmpty()) { result.add(-1); } return result; }
suitableLocations(全职)
Amazon has multiple delivery centers and delivery warehouses all over the world! The world is represented by a number line from - 10º to 10°.
There aren delivery centers, the ith one at location center[i]. A locationx is called a suitable location for a warehouse if it is possible to bring all the products to that point by traveling a distance of no more than d. At any one time, products can be brought from one delivery center and placed at point x. Given the positions of n delivery centers, calculate the number of suitable locations in the world. That is, calculate the number of points x on the number line ( -10° ≤ × ≤ 10°) where the travel distance required to bring all the products to that point is less than or equal to d.
Note: The distance between point x and center[i] is |x - center[i]|, their absolute difference.
Example
Given n = 3, center = [-2, 1, 0], d = 8.
题目理解
Given n = 3, center = [-2, 1, 0], d = 8.
Locate the warehouse at x = -3:
First bring products from center[0] = -2 covering a distance of |-3 - (-2)| = 1 to reach the center
and | -3 - (-2)| = 1 to return.
Similarly we bring products from centers 1 and 2 to point -3 for total distance of 1 + 1 + 4 + 4 + 3 + 3 = 16
which is > d. This is not a suitable location.
一个位置 x 是合适的位置,当且仅当从所有配送中心到位置 x 的距离都不超过 d。距离定义为位置 x 与每个配送中心 center[i] 的绝对差值|x - center[i]|。
解法
我们需要找到一个公共区间,即所有配送中心的区间 [center[i] - d, center[i] + d] 的交集。这个交集的区间就是所有可能的合适位置 x 的范围。
compression matrix (ngOA)
2024.09.17 最新NG面经
一个 n x n 的矩阵,每个位置都有一个数,给一个list,告诉可以从每行取几个数,例如[2,1,2] , 就代表可以从第一行取2个数,第二行取1个数,第三行取2个数。从所有取得的数中,返回top K之和,使得这个和最大。
Amazon has recently established n distribution centers in a new location. They want to set up 2 warehouses to serve these distribution centers. Note that the centers and warehouses are all built along a straight line. A distribution center has its demands met by the warehouse that is closest to it. A logistics team wants to choose the location of the warehouses such that the sum of the distances of the distribution centers to their closest warehouses is minimized.
Given an array dist_centers, that represent the positions of the distribution centers, return the minimum sum of distances to their closest warehouses if the warehouses are positioned optimally.
Function Description
Complete the function getMinTotalDistance in the editor.
getMinTotalDistance has the following parameter:
int dist_centers[n]: the locations of the distribution centers
Returns
int: the minimum sum of distances
Example 1:
Input: dist_centers = [1, 2, 3]
Output: 1
Explanation:
One optimal solution is to position the 2 warehouses at x1 = 1 and x2 = 2.
The supply chain manager at one of Amazon’s warehouses is shipping the last container of the day. All n boxes have been loaded into the truck with their sizes represented in the array boxes. The truck may not have enough capacity to store all the boxes though, so some of the boxes may have to be unloaded. The remaining boxes must satisfy the condition max(boxes) ≤ capacity * min(boxes).
Given the array, boxes, and capacity, find the minimum number of boxes that need to be unloaded.
Function Description
Complete the function getMinimumBoxes in the editor.
getMinimumBoxes has the following parameters:
int[] boxes: an array of integers representing the sizes of the boxes
int capacity: the capacity of the truck
Returns
int: the minimum number of boxes that need to be unloaded
Web Services (AWS) is a cloud computing platform with multiple servers. One of the servers is assigned to serve customer requests. There are n customer requests placed sequentially in a queue, where the ith request has a maximum waiting time denoted by wait[i]. That is, if the ith request is not served within wait[i] seconds, then the request expires and it is removed from the queue. The server processes the request following the First In First Out (FIFO) principle. The 1st request is processed first, and the nth request is served last. At each second, the first request in the queue is processed. At the next second, the processed request and any expired requests are removed from the queue. Given the maximum waiting time of each request denoted by the array wait, find the number of requests present in the queue at every second until it is empty.
Note: If a request is served at some time instant t, it will be counted for that instant and is removed at the next instant.
deffindRequestsInQueue(wait): n = len(wait) result = [] time = 0# 初始化时间 queue = list(range(n)) # 模拟队列(以索引表示请求) while queue: # 每一秒钟 result.append(len(queue)) # 当前队列中请求数量 # 移除当前正在处理的第一个请求 queue.pop(0) # 更新时间 time += 1 # 移除超时的请求 queue = [i for i in queue if wait[i] > time] # 最后队列为空 result.append(0) return result
task scheduler(SDEII)
create rectangles
Given an array of n integers, you are required to create rectangles using pairs of integers from the array. Note that a particular integer can be used in at most one rectangle, and in order to create a rectangle, we must have exactly two pairs of integers with the same values. For example, you can create a rectangle using integers [2, 2, 5, 5] and [4, 4, 4, 4], but not with [3, 3, 5, 8]. The goal is to maximize the total sum of areas of all the rectangles formed.
To make the problem more interesting, you are allowed to reduce any integer by at most 1.
Given the array of integers, find the maximum sum of areas of rectangles that can be formed such that each element of the array can be used as length or breadth of at most one rectangle, and you are allowed to decrease any integer by at most 1.
Please rate the effectiveness of each response option for meeting the deadline.
Work on the project on your own putting in extra effort to finish on time.
Work on the project on your own until Priya(员工名字) is available, then continue to work on it together.
Work on the project with Ben being sure to watch his work closely because of this lack of experience.
Tell your manager you will not be able to complete the project in the time available.
Cut features from the product so you will be able to meet the two week deadline.
Start working on the project right away with Ben. Then ask Priya to contribute what left
Answer:
先告诉Manager有不能按时完成的风险 4 —> 5
2 和 3 利用资源 —>4
1 自己单独做,可以但是没有利用资源 —> 3
5 删除功能 不支持 —> 1
3 4 4 5 1 5
2 - Work on theproject on your own, putting in extra effort to finish on time
3 - Work on theproject on your own until Priya is available, then continue to work on ittogether
4 - Work on theproject with Ben, being sure to watch his work closely because of his lack ofexperience
5 - Tell your manageryou will not be able to complete the project in the time avaliable
1 - Cut features fromthe product so you will be able to meet the two week deadline
3 - Start working onthe project right away with Ben. Then ask Priya to contribute what she can whenshe is avaliable
提前完成Project
别的Team要依赖于你的项目,需要你把原先2周的活在用一周完成
Ask your whold team for help, explaining the urgency that another is blocked.
Work with the Customer Incentives Team to identify the critical features that they need by the deadline and focus on those.
Push the timeline back another week to ensure there is enough time for all work to be completed accurately.
Ask your manager for help in determining the best approach to meet the new deadline.
Put in extra hours yourself to make sure everything gets done on time.
不升级, 因为这样对Retail Website Team没什么重大的影响, 我们要focus on Retail Website Team的需求上
Answer:
不升级,做features,用户优先 4—> 5, 推迟项目了 3—> 3
以后也不升级,不好 6—> 2
升级中
1最好 1—> 4;
推迟顾客需求 2—> 1;
推迟顾客需求 5 —> 1
4 - We should notperform this upgrade at this point in time. We promised the Retail Website Teamwe would have their new features complete by the proposed deadline. Let’spostpone the upgrade to another time
2 - We should notperform the upgrade because it will not have a significant impact on the RetailWebsite Team’s experience. We should focus on the Retail Website Team’srequests
3 - We should notperform this upgrade at this point in time. Our top focus is meeting our agreedupon commitment with the Retail Website Team, so we should finish that first.We can focus on the upgrade afterwards by pushing our deadlines for some of ourother projects
1 - I think we shouldperform the upgrade. The right thing to do is push back on the Retail WebsiteTeam because it will keep our team from having to do the same work twice
5 - I think we shouldperform the upgrade. As a compromise, we can include the gift recommendationfeature the Retail Website Team wants by the deadline and then complete theupgrade. We can finish the seasonal-based gift recommendations feature afterthe deadline
2 - I think we shouldperform the upgrade. The right thing to do is push back on the Retail WebsiteTeam because it will allow us to more efficiently serve the customer and thecustomer will be helped in the long run.
Time Arrangement
Feature
Engineer Estimate of Time to Develop
Product Manager’s Prioritization of Benefit
A
1 to 2 weeks
Medium
B
4 to 6 weeks
High
C
2 to 4 weeks
Low
D
2 to 4 weeks
Medium
E
5 to 9 weeks
High
F
3 to 5 weeks
High
G
2 to 4 weeks
Medium
H
1 to 2 weeks
Low
Rate the effectiveness of each of the following options:
Do any other projects depend on fixing this problem?
How long will it take to solve this problem?
How does this affect customers?
Are we receiving complaints from customers?
How many customers is this affecting?
If I help you with this problem, will you help me finish my work today?
Answer:
和顾客相关:3 —> 5; 4 —> 5; 5—>5
依赖关系: 1—>4
时间评估: 2—>3
6—>1
3 - Do any otherprojects depend on fixing this problem?
5 - How many customersis this affecting?
5 - How does thisaffect customers
4 - Are we receivingcomplaints from customers?
2 - How long will ittake to solve this problem?
1 - If I help you withthis problem, will you help me finish my work today?
图书馆场景题
team项目介绍,log分析和bug
5 - Increase time alotted for testing in overall lifecycle.
5 - Update automated end-to-end tests to include broader data coverage.
3 - Write more unit tests to include edge cases.
3 - Have team members perform more manual testing before checking code in.
1 - Increase the sizeof QA team.
1 - Have more usertesting in beta phase.
图书推荐系统,关于book API,两人观点不一样
永远选tell me more
图书馆实体API
自己设计API覆盖面全,别人做的可以赶上due
requirement优先原则,tell me more层层递进。
然后考虑全面,长远考虑
服务器挂
检查internal bug
我认为3出问题了,但是也去看其它的report
队友说没错,自己去查(不要麻烦别人)
增加测试时间 和 覆盖更多case —> 5
manuel test —> 3
Unit test —> 3
增加QA人手 —> 1
让客服小白鼠 —> 1
Amazon 推荐系统
第一个issue失败 —> username太长
第二个总是显示germany —> 使用了proxy的name觉定语言
case media network 服务器 好多 complaints
德国的,和 invalid recommendation,返回404
出错共同点—> 1.用户名名字太长 2.用户语言变德语
客户DDL只有2week,两个cases
延到4week,做完整
先实现一步,做个demo,然后慢慢做
先实现demo 放到 5
按部就班4周 放3
通知其他做说做不 放1
估计项目开发时间
manager 出现 放5
有经验人请求 放4
上网查资料 or 先做一段时间再估计放 3
其它裸上,硬送 放1
项目时间表设计
Roadmap
最会什么语言 java
Since you know moreabout the programming language than anyone else, you revise the estimate forporting to Java.
安排会议
视频会议 5
3个老二开会 3
老二去找老大开会 3
推迟会议和邮件开会 1
搞个数据库
2week搞个数据库
报告manager 放5
和大腿合作放4
合作/等大腿 放3
自己单干 1
cut features 1
系统升级
做两个features,
1个让用户100%爽
1个让20%的用户爽,但是要升级系统,自己也会爽,但是升级会推迟features
中心在于不升级,先做features,让用户爽先
先做100的feature再升级,再做20的feature,放5
不升级,因为我们承诺要做feature,放4。
不升级,要搞定feature,可以以后推了其他ddl再升级,放3
不升级,因为对其他组没影响,我们应该focus在request上面,放2
升级,推迟这两个feature的ddl,因为升级造福子孙后代,放2
升级,不然要做两次,放1
新产品设计
给8周时间,选择题,让你pick up 一个features的组合要求利益最大化, 每个feature都有相应的价值,H>>M >>L 都代表远大于
1 - We can take our best guess at an estimate on our own
2 - We should work fora couple of days to gauge our progress, and then complete our estimate fromthere
4 - We should consult a coworker who has more relevant experience on this type of task
3 - We should conductour own investigation utilizing online research materials and internaldocumentation
5 - Let’s ask our manager how we should go about developing an estimate
Schedule the design review meeting (2)
3 - Ask all parties to identify a back-up person who could meet during a designated time
3 - See if there is a backup person on the Localization Team that can meet
5 - Set-up video conferencing to include all POC’s regardless of their physical location
1 - Agree to postpone the design review for two weeks when all parties have more availability
2 - Discuss the design review over email
4 - Agree to schedule the meeting at Xavier’s location an hour away
finding the issues with the resources available to you
rate: 1 - 5
Highly Effective
Very Effective
Moderately Effective
Slightly Effective
Ineffective
Investigate the failed requests but ignore the valid requests 3
Search the logs for errors in the timeframe that the error occurred 1
Tell the technician this is a one-time glitch and should resolve itself 5
Look at metrics (e.g., latency, throughput, error counts, number of requests in the last hour) and look for any strange behavior 1
Go to the code directly and try to find the bug manually 3
体现了Bias for Action 但是缺少Dive Deep
Analyze the logs for specific requests that might have failed 1
Immediately ask a more experienced engineer for assistance since it is an urgent issue 2
展现了Learn and Be Curious和Earn Trust
what it the root reason after check
Requests in which customer-reviews and the customer-rating arrays do not have the same number of elements are causing issues.
Dive Deep + Insist on the Highest Standards
Which of the following are pros of implementing Feature 1?
Select four (4) advantages of implementing
Would be a good opportunity to boost revenue
收入: 符合亚马逊追求持续增长
Scalable across multiple platforms
跨平台的可扩展性 —> 帮助公司长远地扩大影响力和市场份额。
Potentially develops long-term relationships with a younger demographic
吸引用户 —> 长期的客户关系
Allows for more engagement across multiple social media platforms
在多个平台 —> 提升品牌影响力和用户参与度
Which of the following are pros of implementing Feature 2? Select two
The external team will likely be more willing to assist with Feature 2
Opportunity to build a good working relationship with the external team
Take a vote on your team because both approaches have pros and cons
Take a vote on your team because both approaches have pros and cons 3
Go with your own option because you’ve already weighed the pros and cons and know what will have most impact for Amazon 4
Go with Kelly Ling’s recommendation since she is more experienced than you 3
Meet with the senior engineers and other high-level decision makers (e.g., manager, directors) to get their input 1
Set up meeting with Kelly Ling and external team to decide which feature to implement 2
Ask your manager for guidance on the decision 1
delivery new features in given timeline
Tell your manager that you cannot complete this by yourself and suggest your manager bring in additional resources 1
Start working on it even though you know it probably won’t get it done. After a few weeks, report your pro ngress to your manager and request additional resources 5
Prioritize social media platforms and work on the most critical first and delay other platforms until after the deadline 2
Plan to work overtime alone in order to get it done 5
Push back on the requirements and suggest only integrating with 1 or 2 additional social media platforms 4
Do not extensively test in order to meet the deadline and be able to deliver results within the deadline 5
On your own, ask other team members if they can pitch in and help 2
符合“Earn Trust”(赢得信任)和“Are Right, A Lot”(常常正确)原则
If you could request additional information, what would help you to determine the better algorithm?
Select the two (2) most relevant response options.
Predicted future trends in data that may impact efficiency of the algorithms
Whether number of deliveries or mileage is the higher priority
Hi,
I was able to get the updated hourly traffic information related to these algorithms for the past 3 days. Take a look and see if this is helpful in making your decision. I’ve also included the original aggregate traffic data used to build the algorithm. Remember that we need to launch this feature in the next 3 days.
Thanks,
Nadia Diaz
Team Lead
What is your final recommendation?
Select the one (1) best response option.
如果交付效率是主要关注点,可能倾向于选择算法#1;如果控制里程更关键,可能选择算法#2。
选择 No conclusive decision can be made with the given data
如果感觉现有数据不足以做出决策,建议进一步分析或开发新算法
Push the code change without testing since it is a very easy change 5
Since both the product manager and your manager have valid concerns, push the decision back on your manager 3
Release the change only when the tests are ready 1
完全符合“Insist on the Highest Standards”和“Earn Trust”原则
Talk to a senior engineer who has a better understanding of the risks before deciding how to proceed 2
Set up a quick meeting with the product manager, your manager, and you to decide how to handle this issue 2
Let Dai make the mistake and stay out of it since it is not your project 5
Show Dai error reports from previous attempts to push code without testing 1
体现了“Learn and Be Curious”以及“Insist on the Highest Standards”,通过具体例子帮助同事认识到测试的重要性。
Ask a senior engineer or others from your team how to handle this situation where coworker wants to push out code without properly testing 2
Report this situation to Dai's manager 3
确保问题得到解决,但可能影响团队间的信任和关系
Set aside your work and offer to help test the code 1
直接提供帮助进行测试是一种积极参与的方式,可以立即解决问题
这不仅体现了高度的责任感和团队合作精神,也直接帮助确保代码质量
Advise him to check with his manager or a senior engineer on his team before moving forward 2
这种方式鼓励Dai自己寻求指导,同时避免了直接的冲突,有助于其个人和职业成长
Work with Dai to revert the code change 1
对问题的直接解决和责任感
Try to contact a senior engineer on how best to proceed to fix the issue 2
Ignore Dai’s instant message and sign off 5
Tell Dai that you told him that was a bad idea 4
Work with Dai to push another code change to fix Dai’s problem immediately 2
新的更改经过适当测试并且确信可以解决问题,这将是一个有效的解决方案
Write up a document to share the knowledge of what happened and how to fix the issue so it doesn’t happen again
VO
9.12 3轮NG
第一轮
1题 lc: 316
第二轮
全BQ
BQ被follow up的很深
第三轮
2BQ + OOD
OOD: dog day care System
OOD狂问error handeling 还有各种奇葩case 和problem
有large dog play ground 和 small dog play ground,20 和30的max limit
提供dog id
implement check in 和 check out
需要verify dog age and vaccination(这个是assume 已经存在的function)