{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lec0411-pq-ann - Announcements W ”and MP 6 available Due...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 12
Background image of page 13
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Announcements: W. ”and MP 6 available. Due 4/15. 11 :59p. Today: Secret Mystery Data Struct e Hash table performance: :x'o- ed Arm‘s?“ Findluoy) under SUHA near Pmbm - Do not memorize these! successful: Z (I + l/("a» . . Observe: unsuccessful. A (‘ + “0"“)? 1. Asalncneases. running times it 3 . Quadratlc and double hashing - 2- If 0 I! held constant then 3" successful: ”/I" ( "" CY )/ ‘1 mn”&'&”§$fl” 3 ' "WWI: u/( n— a ) Which is hem t )6? . 8.9m, . Structure speed -P' ““4 separate m": , + (1' /2 What structures do hagflgsr' replace for us? . 0 nsuccessful: l + a BORN; ‘3 ““W 3} “Wit" 3.. WW? NVA'S ReHashing: insert Prioriy Queue ADT: ermm 353% 0") EIEMIIIE ”“4 00‘) a: an m: m: In A!“ om $32. “"43..- W MM" Priority Queue: another Implementation option Raga ‘1'?" Mb huh-l: W m who» Jr *‘9 . 5 6\. . “‘5 «w w H) A W, B. o. LMW x (min)Heap: Impiementatlon /\ \c9’(CL-'U(k\= 2k nglbo' 2k.“ pa mi: Uh Uh] (min)Heap: a quickie... /\ (mi n:r)Heap eom veinM @ Code: tonplato <class T> void H.3p<?>z:insozt(const T a key){ if (star-capacity) grunt-toy“: uizo++l itmlsizc] - key.- hoapifyup(a£ao)t complete <c1¢ss T> void Heap<‘r>: :rmveflint) ( itmll] - itmtsizo] .- size--: hoapifybounfl) ,' template (class 1) template «316” 1' void Map<buhoapi£y0punt cIndoxH void floap<1>szina , 1t (cIndox > )i if (sizo-capa if (iconstclndoxl itcnstpaaont(c1ndox)l{ 0130+?! itm[uiz.] - luap(—,—) I noapityopuiup hapifwm—I I template <c1aus T> void flnap<r>::honp1£yooun(1nt c1nd.x){ if (ha-whildtclndox) ) I if (itenJIcIndoxl it.ns[n1nChild(cIndox)]l lllp(____________ _____________): What have we done? ...
View Full Document

{[ snackBarMessage ]}