正在加载图片...
Heaps Basic Idea Heaps:Storage Q-1:Why do we implement a heap with an array? PARENT(i) 16 I return [i/2] 0 122345678910 LEFT(i) 1614108793241] 1 return 2i RIGHT(i) (a】 (b) 1 return 2i+1 Easy to index ●Save memory 口卡4①怎至月QC MA Jun (Institute of Computer Software) Problem Solving May7.20204/29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Heaps Basic Idea Heaps: Storage Q-1: Why do we implement a heap with an array? Easy to index Save memory Better cache locality MA Jun (Institute of Computer Software) Problem Solving May 7, 2020 4 / 29
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有