美团成都闪购3.24前端一面凉经

自我介绍
项目相关
为什么学前端
怎么看待vue和react。为什么学了vue,对react了解多少
vue和react这些框架的出现解决了哪些问题(答复用和前端工程化)。面试官反问组件复用和前端工程化原生都可以做到,有多少了解(没了解,反问是微前端吗,不是)
node了解多少
nodejs的事件循环和浏览器的事件循环区别(没答上来)
tcp/udp,为什么需要四次挥手
for in   for  of的区别,可枚举类型和可迭代类型的区别,在其他语言是否有实现
http 1 2 3 的区别(网络部分答得特别差
三道题
数组扁平化
树的高度(不是二叉树)
两个dom节点的第一个公共父节点
在面试官的提示下写出来了,但是写错了好几次
感觉已经凉了#我的失利项目复盘#
全部评论
<html lang="en"> <body> father son1 son2 </body></html>
2 回复 分享
发布于 2023-03-24 17:26 重庆
这里统计回复一下,今天收到了二面邀请,不过美团二面挂人挺多的,技术栈也不对,应该是kpi
1 回复 分享
发布于 2023-03-29 10:09 河南
//定义一个树类 class TreeNode { constructor(val) { this.val = val; this.children = []; } } function treeHeight(root) { if (!root) { return 0; } let max = 0; for (let i = 0; i < root.children.length; i++) { const height = treeHeight(root.children[i]); if (height > max) { max = height; } } return max +1; } const root = new TreeNode(1); const node2 = new TreeNode(2); const node3 = new TreeNode(3); const node4 = new TreeNode(4); const node5 = new TreeNode(5); const node6 = new TreeNode(6); const node7 = new TreeNode(7); root.children.push(node2); root.children.push(node3); node2.children.push(node4); node2.children.push(node5); node3.children.push(node6); node5.children.push(node7); console.log("root->", treeHeight(root));
1 回复 分享
发布于 2023-03-24 17:27 重庆
怎么说楼主 过了吗
点赞 回复 分享
发布于 2023-03-25 00:06 北京

相关推荐

评论
5
40
分享

创作者周榜

更多
牛客网
牛客企业服务