注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
很早之前投了狗家,应该是三月份,五月份来了面试,流程拖了很久,因为一直在刷题,好在后面过了,可惜team match没搞上,现在去nv了
五月份一面online
是一个coding题目,大概是这样(叫AI总结了下)
Connected Crop Arrangement
You are given a garden represented by an N x M grid.
There are K different kinds of crops, labeled from 1 to K. For each crop i, you are given count[i], representing exactly how many cells must contain that crop.
It is guaranteed that:
sum(count) = N * M
so every cell in the garden must be used.
For every crop type, all cells containing that crop must form one connected component. Two cells are considered connected if they share an edge, meaning you may move only:
up, down, left, right
Diagonal movement does not count.
Return any valid arrangement of the crops satisfying all requirements.
Requirements
- Every grid cell contains exactly one crop.
- Crop i appears exactly count[i] times.
- All cells belonging to the same crop must be connected through horizontal or vertical moves.
- Different crops do not arrays.
If the ordering constraints conflict with each other, return false.
Otherwise, return true (or any valid merged sequence).
Example 1
Input:
a = [1, 2, 3]
b = [2, 4, 5]
Output:
true
One valid merged order is:
[1, 2, 3, 4, 5]
Example 2
Input:
a = [1, 6, 4]
b = [4, 1]
Output:
false
The first array requires:
1 -> 6 -> 4
while the second array requires:
4 -> 1
These constraints create a contradiction, so no valid merged order exists.
总结
四个面试跨度了几个月,其中基本把面经原题全部刷了一遍,多刷面经还是很有用的。面完之后就说过了,然后team match流程现在还没走完,估计L3 match不上吧。
手里也有微软和NV的offer,最后去NV了应该
|