E4 地点 MPK
我有4年工作经验,目前是 SDE 1
面的是 Generalist E4
Onsite
第一轮 (Coding) :
- determine if the given string is a valid integer.
This is very similar to AtoI but an easier version - https://leetcode.com/problems/string-to-integer-atoi/ - What is the complexity of finding the max value of an element in an array
Big O, Big Theta, Big Omega
第二轮 (系统设计) :
Design a live reload feature for Instagram comments (new comments appear instantly)
午饭
第三轮 (Coding) :
- Given an array find if it is monotonically increasing or not
https://leetcode.com/problems/monotonic-array/ - Find the contiguous subarray sum equal to K
https://leetcode.com/problems/continuous-subarray-sum/ however negatives were allowed in the input
第四轮 (Behavioral) :
- Behavioral questions like greatest technical challenge, interpersonal challenge, etc
- Given an array of words, find which pairs of words form palidromes
第五轮 (coding) :
- Find a binary tree’s boundary(perimeter) nodes
https://leetcode.com/problems/boundary-of-binary-tree/ - Count the number of islands in a 2D array (diagonal movements allowed)
https://leetcode.com/problems/number-of-islands/ , went into indepth discussion of iterative vs recursive solution, and optimizing recursive calls (bounds checking before recursing)
第六轮 (coding) :
- Add two numbers
https://leetcode.com/problems/add-two-numbers/ the digits were stored in a list and in non-reverse order. Could be negative numbers ex ["-",“1”,“3”] - Subtract two numbers
Same as above but subtracting the two numbers instead of adding