当前位置:网站首页>海量数据TopN问题
海量数据TopN问题
2022-07-28 09:54:00 【Schuyler_yuan】
1. 在十万的数字中找出前100?
答:快排patition+二分,堆
2. 10亿的数字找前10万,空间给1亿?
答:(分治法加堆),时间复杂度klogk
3. 100亿数字找前10亿,空间1亿?
答:这个问题不是算法问题了,应该是在问工程上的实现,基本得靠切分到多台机器并行运算来解决,具体怎么做,看下那个64马找前四的问题。
总之,对于海量数据问题,都是用的“map-reduce”的思想来分而治之,分开局部处理,之后再汇总起来计算。
参考:
海量数据中的TOPK问题小结 - Excaliburer - 博客园
边栏推荐
- web之圣杯和双飞翼布局、float、clear、both
- Skiasharp's WPF self drawn drag ball (case version)
- Sizebasedtriggingpolicy introduction
- Boss: there are too many systems in the company. Can we realize account interworking?
- Branches and loops (1)
- Holy Grail of web and double wing layout, float, clear, both
- B2B2C系统亮点是什么?如何助力珠宝首饰企业打造全渠道多商户商城管理体系
- _HUGE and __IMP__HUGE in “math.h“
- Openatom openharmony sub forum, see you today at 14:00! Wonderful release of memorabilia attached
- How PHP gets the interface
猜你喜欢

博弈论 1.Introduction(组合游戏基本概念、对抗搜索、Bash游戏、Nim游戏)

arthas使用教程

我用小程序容器让移动研发效率提升了5倍!

21. 合并两个有序链表

Pycharm uses CONDA to call the remote server

2022-uni-app解析token标准的方式-使用jsrsasign-爬坑过了

OSPF expansion configuration, routing principles, anti ring and re release

Software testing and quality learning notes 2 - black box testing

Plato farm - a farm meta universe game with Plato as the goal

为报复公司解雇,我更改了项目的所有代码注释!
随机推荐
Basic examples that must be mastered by beginners of C #
(十)defer关键字
Read Plato farm's eplato and the reason for its high premium
Time series analysis 41 - time series prediction tbats model
j s的数组方法,循环
Irregular area of OSPF, LSA and serial number
SkiaSharp 之 WPF 自绘 拖曳小球(案例版)
OSPF expansion configuration, routing principles, anti ring and re release
New features of ES6
In php7?? And?: Differences between
Being on duty less than 8 hours a day and being dismissed? Tencent's former employees recovered 13million overtime pay, etc., and the court won a compensation of 90000 in the final judgment
_HUGE and __IMP__HUGE in “math.h“
PHP 获取接口的方式
房地产数字化转型方案:全方位数智化系统运营,助力房企管控实效提升
19. 删除链表的倒数第 N 个结点
基于ModelArts续写最伟大的作品【玩转华为云】
2022 uni app parsing token standard - use jsrsasign - climb the pit
Sizebasedtriggingpolicy introduction
Introduction to thresholdfilter
3 minutes to tell you how to become a hacker | zero foundation to hacker getting started guide, you only need to master these five abilities