当前位置:网站首页>外部排序的基本内容
外部排序的基本内容
2022-06-21 22:05:00 【Nancy-sn】
1.内存空间:若要进行 k 路归并排序,则需要在内存中分配 k 个输入缓冲区和1个输出缓冲区
2.外部排序的实现步骤:①生成 r 个初始归并段(对 L 个记录进行内部排序,组成一个有序的初始归并段)②进行 S 趟 k 路归并, S = logk r向上取整
3.如何进行 k 路归并
把 k 个归并段的块读入 k 个输入缓冲区;用“归并排序”的方法从 k 个归并段中选出几个最小记录暂存到输出缓冲区中;当输出缓冲区满时,写出外存
4.外部排序的时间开销:读写外存的时间+内部排序所需时间+内部归并所需时间
5.外部排序的优化:①增加归并路数 k ,进行多路平衡归并:代价1:需要增加相应的输入缓冲区;代价2:每次从 k 个归并段中选一个最小元素需要( k -1)次关键字对比②减少初始归并段数量r
边栏推荐
- How to associate the QR code of wechat applet and realize the integration of two codes
- Golang calls sdl2, plays PCM audio, and reports an error signal arrived during external code execution.
- Go语言学习教程(十二)
- golang调用sdl2,播放pcm音频,报错signal arrived during external code execution。
- Elementary transformation of numpy matrix
- June 21, 2022: golang multiple choice question, what does the following golang code output? A:3; B:4; C:100; D: Compilation failed. package main import (
- 无法定位程序输入点于动态链接库怎么办
- 转载:网络加载框架 - Retrofit
- Some users of uniapp wechat authorization cannot be authorized normally
- 关于 allegro的pcbEditor在使用过程中经常卡或者busy无响应 的解决方法
猜你喜欢

Win11怎么把桌面文件路径改到D盘

Fork join thread pool

Qt文档阅读笔记-staticMetaObject解析与实例

Rk3568 Development Notes (III): update source, installation of network tools, serial port debugging, network connection, file transfer, installation of vscode and Samba shared services for rk3568 virt

Why applets and the industrial Internet can complement each other

在线文本按行批量反转工具

Unity network development (II)

關於 麒麟系統開發錯誤“fatal error: GL/gl.h: No such file or directory“ 的解决方法
![Jmter test command [note]](/img/96/4290b92beb0755c6724a3b8d7dc635.png)
Jmter test command [note]

Win11打字不显示选字框怎么办?Win11打字不显示选字框的解决方法
随机推荐
数据库主键一定要自增吗?有哪些场景不建议自增?
Inventory common vulnerability utilization methods
windows sql server 如何卸载干净?
Golang calls sdl2, plays PCM audio, and reports an error signal arrived during external code execution.
Uniapp solves the cross domain problem of Google browser and runs in Google browser
leetcode1337. Row K with the weakest combat effectiveness in the matrix
About the solution to "the application cannot start normally 0xc00000022" after qt5.15.2 is installed and qtcreator is started
JUnit VS TestNG
About the designer of qtcreator the solution to the problem that qtdesigner can't pull and hold controls normally
What is the fault when the router is connected but not connected to the network
CVPR2022 | 弱监督多标签分类中的损失问题
Getting started with reverse debugging - Basics
无法定位程序输入点于动态链接库怎么办
spacy.load(“en_core_web_sm“)###OSError: [E050] Can‘t find model ‘en_core_web_sm‘.
Danfoss inverter maintenance vlt5000/vlt6000/vlt8000
Online text batch inversion by line tool
How to open a VIP account in flush? Is it safe?
1016. substring can represent binary string of numbers from 1 to n
Shanghai Jiaotong University: Kerong Wang | bootstrap transformer based on off-line reinforcement learning
Win11 hotspot connection successful but no network? Solution of win11 mobile hotspot and network conflict