Meta SDE 面经 | Meta NG VO | Meta tag题 | VO辅助 | 代面试 | 面试辅助

1,216閱讀
沒有評論
Meta SDE 面经 | Meta NG VO | Meta tag题 | VO辅助 | 代面试 | 面试辅助

今天给大家update的信息是关于meta的,最近meta的效率变得很低,这两天很多reschedule的case,并且很多case面完都没有回音,有的hr明说了decision可能会拖到年后,大家稍安勿躁。
第一轮是白人男,两道leetcode tag题。我们使用的python,为啥今天强调一下,埋个伏笔。

Meta VO

Meta面试第一道题很简单

We have a nested list structure containing both integers and sub-lists (nested arrays). Each integer’s contribution to the final sum is multiplied by the depth level at which the integer is found. The depth of the top-level integers is 1, and if we go one level deeper, the integers there have a depth of 2, and so on. We need to compute the sum of all integers, each weighted by its depth.

Clarify的关键信息是,深度是不是从第一行开始,需要注意下为空的边界条件。用递归,主函数里套了一个带深度的dfs。然后code+ dry run, 加起来大概十分钟秒了。

详细思路是DFS遍历列表:

  • 逐一检查列表中的元素。
  • 如果元素是一个整数,将它的值乘以当前深度,累加到总和中。
  • 如果元素是一个子列表,继续DFS,同时将深度加1。
  • 最后直接计算加权值并返回即可。

重点是第二道题

You are given a string Q consisting of parentheses () and []. A string of this type is said to be correct: (a) if it is the empty string
(b) if A and B are correct, AB is correct,
(c) if A is correct, (A) and [A] are correct.

Write a program that takes a sequence of strings of this type and check their correctness. Your program can assume that the maximum string length is 128.

题目是平衡括号,给的方法是stack+set的解法。这个解法时间、空间复杂度都是O(n),因为说的写的都会很快。我们预设面试官会紧接着问有没有空间O(1)的方法。就是leetcode solution的那个正着搜遍,反着搜一遍那个解。但需要一个temp来存储结果。面试官听懂算法了,但没get到需要一个 list。

敲的时候被打断,说有result存结果,不算O(1)。我们提供的是python解法,python的字符串是immutable的,所以原地改输入也是额外的空间复杂度。然后面试官手动把输入变成了mutable的 (list)。

敲完之后,面试官问了empty case,说正常处理返回empty,然后他不懂python,问下面这行第三个参数是啥,我们说是往回step,for read index in range(length-1,-1,-1):他觉得这一行代码可以处理 empty case非常magic,然后我解释了一下这行代码怎么处理的 empty case。

他问你一开始就知道嘛.”对,我一开始就知道,这是反向遍历一个list的best practice.”
面试官很满意,完美.

Meta系统设计面试(SD)

系统设计环节通常45分钟,考察你的系统理解、产品能力设计等问题。系统设计需要展示你在大型系统架构中的思维方式。

设计一个ticket master。

我们梳理好user flow,画一个各个component都有的图就行了。

需求如下:

  • 如何处理短时间内大量人抢票的场景
  • 如何给买票界面有一个timeout,超过一定时间没付款怎么处理
  • 票都卖完了怎么处理
  • 如何确保付款的人一定拿得到票
  • 如何实现一个waitlist,如果有人退票了优先通知waitlist上靠前的人

以上就是本次Meta两轮Coding,一轮System design的VO真题分享。

联系我们

我们提供OA代写、meta VO辅助面试和面试代面的服务。对于OA代写服务,我们将确保您获得满分。VO辅助、VO代面对口型通过率80%+,马上联系我们吧。

author avatar
azn7u2@gmail.com
正文完
 0
评论(沒有評論)