网易笔试

This commit is contained in:
xiongraorao
2018-08-11 17:02:40 +08:00
parent 1d42ecffe6
commit 1907ff2e3b
8 changed files with 305 additions and 4 deletions

View File

@ -0,0 +1,5 @@
# 大顶堆和小顶堆
比如求10亿个数中的最大的前10个数时时构建只有10个元素的小顶堆如果比堆顶小则不处理如果比堆顶大则替换堆顶然后依次下沉到适当的位置。
比如求10亿个数中的最小的前10个数时时构建只有10个元素的大顶堆如果比堆顶大则不处理如果比堆顶小则替换堆顶然后依次下沉到适当的位置。