注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
一面:
(1) [size=14.6667px]In an array of integers, given a window size k, print out the maximum integer value in each window inside that array, starting at the front of the array.
[size=14.6667px]我用maxheap 做的, time complexity O(nlog(k)). n is the length of the array.
[size=14.6667px]
[size=14.6667px](2) Give a directed acyclic graph (DAG) of size n, and we convert it to a tree (do not have to be a binary tree). Whatr elements, where popular is element which occurs > N/4 times
[size=14.6667px]
[size=14.6667px]发面经,攒人品,求过,求过,求过!
补充内容 (2016-2-20 04:18):
[size=14.6667px]是乱码 |