0%

vivo校招提前批笔试

选择题知识点

  • 评价准则
  • 决策树算法
  • 共现性特征
  • OSL估计
  • 过拟合
  • Type1,Type2 Error
  • PCA SVD 什么情况下等价
  • 逻辑回归系数
  • 集成算法
  • 模型梯度
  • bias-variance trade-off
  • bagging
  • 基于统计的分词方法
  • knn参数模型非参数模型
  • 优化算法

大题

具体内容后续补充 ### 推荐算法举例 优缺点 实际场景应用

不同路径的个数

部分错排问题

面试

  • 项目介绍
    • 你们用的评价指标是什么
    • 对深度学习了解吗
    • 未来实验规划

手写代码

给定一个二叉树, 找到该树中两个指定节点的最近公共祖先。 这道题剑指offer上和leetcode上都有。 我说出思路,并没有答好。

236. 二叉树的最近公共祖先

解法:递归求解,左子树找不到就返回右子树,右子树找不到就返回左子树,都找到了就返回当前的节点

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None

class Solution:
def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode':
if root is None or root==p or root==q:
return root
left = self.lowestCommonAncestor(root.left, p, q)
right = self.lowestCommonAncestor(root.right, p, q)
if not left:
return right
if not right:
return left
return root

结果

白菜offer