登录
  • #美国面经
  • #码农类general
  • #面试经验
  • #google

google 面经题

bobzhang2004
2534
6
Considering there are N engineers in one company with id from 1 to N, Each of the Engineer has a skill rate R_i,

本帖隐藏的内容需要积分高于 188 才可浏览,点击前往一亩三分地论坛阅读

n)的啊,如果要做到O(lgn),需要时hash heap啊,“we want to know the highest skill rating of all the groups whose size is X.”是说每个window中找最小值,然后求的是整个过程中的最大值. 如果用hash heap的话可以到O(nlgnk), 如果是普通的话是O(nk)
6条回复
热度排序

发表回复