Data Structures Advanced

Data Structures Advanced

ID:40058110

大小:1.72 MB

页数:48页

时间:2019-07-18

Data Structures Advanced_第1页
Data Structures Advanced_第2页
Data Structures Advanced_第3页
Data Structures Advanced_第4页
Data Structures Advanced_第5页
资源描述:

《Data Structures Advanced》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、DataStructuresAdvancedBasicReviewListGraphQueueTreeStackLet’sgofurther…DSforinterval…O(logn)?Justbinary!SegmentTree[1,4][1,4][1,2][1,2][3,4][3,4][1,1][1,1][[[2,2][2,2]]][3,3][3,3][4,4][4,4]SegmentTreeSegmentTree2k-1>=nk<=lognO(logn)SegmentTreeMakeTreeNODE.MIDSegmentTreeQuery&

2、UpdateSituation1Situation2Situation3SegmentTreeupdateSegmentTreequerySegmentTreeSegmentTreeRMQNODE.MIDSegmentTreeMAX(X)=MAX(MAX(X1),MAX(X2))x2x1xSegmentTree[1,4][1,4]12306[1,2][1,2]23[3,4][3,4]12306[1,1][1,1]22[[[2,2][2,2]]][3,3][3,3]12306[4,4][4,4]3123SegmentTreeBuddySystemStart1024A=70KA12825651

3、2B=35KAB64256512C=80KAB64C128512Afree128B64C128512D=60K128BDC128512Bfree12864DC128512Dfree256C128512Cfree512512End1024ReferfromcoolshellSegmentTree[1,1024][1,1024]0:896[1,512][1,512]0:384[513,1024][513,1024]1:512[1,256][1,256][[[257,512][257,512]]][513,768][513,768][769,1024][769,1024]1:2560:01:25

4、61:256UFSet55227733661144UFSetNodeUFSetfindParent11223344UFSetO(n)findParentUFSetPathCompress4411112222333344UFSetPathCompress4411221133223344UFSetPathCompress4411221133223344UFSetPathCompressOptimize1UFSetUnionbyrank55Eg1.Union(4,5)1166227733889944UFSetUnionbyrankEg.Union(3,5)665544771122338899UF

5、SetUnionbyrankEg.Union(3,5)665544771122338899Root(3)!=Root(5)UFSetUnionbyrankEg2.Union(3,6)116622335544UFSetUnionbyrankEg2.Union(3,6)113366224455Root(3)==Root(6)UnionbyrankUFSetOptimize2SkipListReferfromODSSkipListOffline11991155991133557799112233445566778899SegmentTreeOnline?SkipListCointossingSk

6、ipListSkipListAnEfficientSSet…SkipListOrder?ContainX?SkipListSkipListSkipListSkipListSkipListAnEfficientRandom-AccessListSkipListKth?Rank?SkipListSkipListLstL+1L1L2sxtThanks

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。