搜狐-算法-一面
1.自我介绍
2.yolo算法和fast cnn 的区别、yolo的网络结构
https://zhuanlan.zhihu.com/p/25236464
4.如何数据扩充
5.Unet结构
6.注意力机制怎么加的
7.特种筛选如何筛选的
8.编程题1
寻找两个正序数组的中位数
https://leetcode-cn.com/problems/median-of-two-sorted-arrays/
class Solution: def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float: n1 = len(nums1) n2 = len(nums2) if n1 > n2: return self.findMedianSortedArrays(nums2,nums1) k = (n1 + n2 + 1)//2 left = 0 right = n1 while left < right : m1 = left +(right - left)//2 m2 = k - m1 if nums1[m1] < nums2[m2-1]: left = m1 + 1 else: right = m1 m1 = left m2 = k - m1 c1 = max(nums1[m1-1] if m1 > 0 else float("-inf"), nums2[m2-1] if m2 > 0 else float("-inf") ) if (n1 + n2) % 2 == 1: return c1 c2 = min(nums1[m1] if m1 < n1 else float("inf"), nums2[m2] if m2 <n2 else float("inf")) return (c1 + c2) / 2
9.编程题2
无重复字符的最长子串
https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/
class Solution: def lengthOfLongestSubstring(self, s: str) -> int: if not s:return 0 left = 0 lookup = set() n = len(s) max_len = 0 cur_len = 0 for i in range(n): cur_len += 1 while s[i] in lookup: lookup.remove(s[left]) left += 1 cur_len -= 1 if cur_len > max_len:max_len = cur_len lookup.add(s[i]) return max_len
2021届秋招算法岗笔经面经 文章被收录于专栏
小白一枚,有误的地方还请大佬们指正