CINXE.COM
Halda (datová struktura) – Wikipedie
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="cs" dir="ltr"> <head> <meta charset="UTF-8"> <title>Halda (datová struktura) – Wikipedie</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )cswikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":[",\t."," \t,"],"wgDigitTransformTable":["",""], "wgDefaultDateFormat":"ČSN basic dt","wgMonthNames":["","leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],"wgRequestId":"75082a74-10c1-4f01-b2ca-137559146153","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Halda_(datová_struktura)","wgTitle":"Halda (datová struktura)","wgCurRevisionId":24392820,"wgRevisionId":24392820,"wgArticleId":114729,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Monitoring:Autoritní kontrola s 0 identifikátory","Haldy","Stromy (datové struktury)"],"wgPageViewLanguage":"cs","wgPageContentLanguage":"cs","wgPageContentModel":"wikitext","wgRelevantPageName":"Halda_(datová_struktura)","wgRelevantArticleId":114729,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia", "wgCiteReferencePreviewsActive":false,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"cs","pageLanguageDir":"ltr","pageVariantFallbacks":"cs"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":9000,"wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q274089","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":true,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready", "user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.math.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.WikiMiniAtlas","ext.gadget.OSMmapa","ext.gadget.direct-links-to-commons","ext.gadget.ReferenceTooltips","ext.gadget.courses","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth", "ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=cs&modules=ext.cite.styles%7Cext.math.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=cs&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=cs&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Halda (datová struktura) – Wikipedie"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//cs.m.wikipedia.org/wiki/Halda_(datov%C3%A1_struktura)"> <link rel="alternate" type="application/x-wiki" title="Editovat" href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedie (cs)"> <link rel="EditURI" type="application/rsd+xml" href="//cs.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://cs.wikipedia.org/wiki/Halda_(datov%C3%A1_struktura)"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.cs"> <link rel="alternate" type="application/atom+xml" title="Atom kanál Wikipedie." href="/w/index.php?title=Speci%C3%A1ln%C3%AD:Posledn%C3%AD_zm%C4%9Bny&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Halda_datová_struktura rootpage-Halda_datová_struktura skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Přeskočit na obsah</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Projekt"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Hlavní menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Hlavní menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Hlavní menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">přesunout do postranního panelu</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">skrýt</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigace </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage" class="mw-list-item"><a href="/wiki/Hlavn%C3%AD_strana" title="Navštívit Hlavní stranu [z]" accesskey="z"><span>Hlavní strana</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/N%C3%A1pov%C4%9Bda:Obsah" title="Místo, kde najdete pomoc"><span>Nápověda</span></a></li><li id="n-helpdesk" class="mw-list-item"><a href="/wiki/Wikipedie:Pot%C5%99ebuji_pomoc" title="Pokud si nevíte rady, zeptejte se ostatních"><span>Potřebuji pomoc</span></a></li><li id="n-featuredcontent" class="mw-list-item"><a href="/wiki/Wikipedie:Nejlep%C5%A1%C3%AD_%C4%8Dl%C3%A1nky" title="Přehled článků, které jsou považovány za nejlepší na české Wikipedii"><span>Nejlepší články</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Speci%C3%A1ln%C3%AD:N%C3%A1hodn%C3%A1_str%C3%A1nka" title="Přejít na náhodně vybranou stránku [x]" accesskey="x"><span>Náhodný článek</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Speci%C3%A1ln%C3%AD:Posledn%C3%AD_zm%C4%9Bny" title="Seznam posledních změn na této wiki [r]" accesskey="r"><span>Poslední změny</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedie:Port%C3%A1l_Wikipedie" title="O projektu, jak můžete pomoci, kde hledat"><span>Komunitní portál</span></a></li><li id="n-villagepump" class="mw-list-item"><a href="/wiki/Wikipedie:Pod_l%C3%ADpou" title="Hlavní diskusní fórum"><span>Pod lípou</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Hlavn%C3%AD_strana" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedie" src="/static/images/mobile/copyright/wikipedia-wordmark-cs.svg" style="width: 7.5em; height: 1.1875em;"> <img class="mw-logo-tagline" alt="Wikipedie: Otevřená encyklopedie" src="/static/images/mobile/copyright/wikipedia-tagline-cs.svg" width="118" height="13" style="width: 7.375em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Speci%C3%A1ln%C3%AD:Hled%C3%A1n%C3%AD" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Prohledat tuto wiki [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Hledání</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Hledat na Wikipedii" aria-label="Hledat na Wikipedii" autocapitalize="sentences" title="Prohledat tuto wiki [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Speciální:Hledání"> </div> <button class="cdx-button cdx-search-input__end-button">Hledat</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Osobní nástroje"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Vzhled"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Změnit vzhled velikosti písma, šířky stránky a barvy" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Vzhled" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Vzhled</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_cs.wikipedia.org&uselang=cs" class=""><span>Podpořte Wikipedii</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Speci%C3%A1ln%C3%AD:Vytvo%C5%99it_%C3%BA%C4%8Det&returnto=Halda+%28datov%C3%A1+struktura%29" title="Doporučujeme vytvořit si účet a přihlásit se, ovšem není to povinné" class=""><span>Vytvoření účtu</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Speci%C3%A1ln%C3%AD:P%C5%99ihl%C3%A1sit&returnto=Halda+%28datov%C3%A1+struktura%29" title="Doporučujeme vám přihlásit se, ovšem není to povinné. [o]" accesskey="o" class=""><span>Přihlášení</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Další možnosti" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Osobní nástroje" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Osobní nástroje</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Uživatelské menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_cs.wikipedia.org&uselang=cs"><span>Podpořte Wikipedii</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Speci%C3%A1ln%C3%AD:Vytvo%C5%99it_%C3%BA%C4%8Det&returnto=Halda+%28datov%C3%A1+struktura%29" title="Doporučujeme vytvořit si účet a přihlásit se, ovšem není to povinné"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Vytvoření účtu</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Speci%C3%A1ln%C3%AD:P%C5%99ihl%C3%A1sit&returnto=Halda+%28datov%C3%A1+struktura%29" title="Doporučujeme vám přihlásit se, ovšem není to povinné. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Přihlášení</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Stránky pro odhlášené editory <a href="/wiki/N%C3%A1pov%C4%9Bda:%C3%9Avod" aria-label="Více informací o editování"><span>dozvědět se více</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Speci%C3%A1ln%C3%AD:Moje_p%C5%99%C3%ADsp%C4%9Bvky" title="Seznam editací provedených z této IP adresy [y]" accesskey="y"><span>Příspěvky</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Speci%C3%A1ln%C3%AD:Moje_diskuse" title="Diskuse o editacích provedených z této IP adresy [n]" accesskey="n"><span>Diskuse</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Projekt"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Obsah" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Obsah</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">přesunout do postranního panelu</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">skrýt</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(úvod)</div> </a> </li> <li id="toc-Operace_s_haldou" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Operace_s_haldou"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Operace s haldou</span> </div> </a> <ul id="toc-Operace_s_haldou-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Popis_haldy" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Popis_haldy"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Popis haldy</span> </div> </a> <ul id="toc-Popis_haldy-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Obousměrné_haldy_(Double_heaps)" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Obousměrné_haldy_(Double_heaps)"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Obousměrné haldy (Double heaps)</span> </div> </a> <ul id="toc-Obousměrné_haldy_(Double_heaps)-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Varianty_haldy" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Varianty_haldy"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Varianty haldy</span> </div> </a> <ul id="toc-Varianty_haldy-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Porovnání_teoretických_hranic_složitostí_pro_jednotlivé_varianty" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Porovnání_teoretických_hranic_složitostí_pro_jednotlivé_varianty"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Porovnání teoretických hranic složitostí pro jednotlivé varianty</span> </div> </a> <ul id="toc-Porovnání_teoretických_hranic_složitostí_pro_jednotlivé_varianty-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Využití_haldy" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Využití_haldy"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Využití haldy</span> </div> </a> <ul id="toc-Využití_haldy-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Implementace_haldy" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Implementace_haldy"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Implementace haldy</span> </div> </a> <button aria-controls="toc-Implementace_haldy-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Přepnout podsekci Implementace haldy</span> </button> <ul id="toc-Implementace_haldy-sublist" class="vector-toc-list"> <li id="toc-Implementace_binární_haldy" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Implementace_binární_haldy"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.1</span> <span>Implementace binární haldy</span> </div> </a> <ul id="toc-Implementace_binární_haldy-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Poznámky" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Poznámky"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Poznámky</span> </div> </a> <ul id="toc-Poznámky-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Externí_odkazy" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Externí_odkazy"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>Externí odkazy</span> </div> </a> <ul id="toc-Externí_odkazy-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Obsah" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Přepnout obsah" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Přepnout obsah</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Halda (datová struktura)</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Přejděte k článku v jiném jazyce. Je dostupný v 41 jazycích" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-41" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">41 jazyků</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D9%83%D9%88%D9%85%D8%A9_(%D9%87%D9%8A%D8%A7%D9%83%D9%84_%D8%A8%D9%8A%D8%A7%D9%86%D8%A7%D8%AA)" title="كومة (هياكل بيانات) – arabština" lang="ar" hreflang="ar" data-title="كومة (هياكل بيانات)" data-language-autonym="العربية" data-language-local-name="arabština" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/Qalaq_(veril%C9%99nl%C9%99r_strukturu)" title="Qalaq (verilənlər strukturu) – ázerbájdžánština" lang="az" hreflang="az" data-title="Qalaq (verilənlər strukturu)" data-language-autonym="Azərbaycanca" data-language-local-name="ázerbájdžánština" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Heap_(estructura_de_dades)" title="Heap (estructura de dades) – katalánština" lang="ca" hreflang="ca" data-title="Heap (estructura de dades)" data-language-autonym="Català" data-language-local-name="katalánština" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wikipedia.org/wiki/%DA%BE%DB%8C%D9%BE_(%D9%BE%DB%8E%DA%A9%DA%BE%D8%A7%D8%AA%DB%95%DB%8C_%D8%AF%D8%B1%D8%A7%D9%88%DB%95)" title="ھیپ (پێکھاتەی دراوە) – kurdština (sorání)" lang="ckb" hreflang="ckb" data-title="ھیپ (پێکھاتەی دراوە)" data-language-autonym="کوردی" data-language-local-name="kurdština (sorání)" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Hob_(datastruktur)" title="Hob (datastruktur) – dánština" lang="da" hreflang="da" data-title="Hob (datastruktur)" data-language-autonym="Dansk" data-language-local-name="dánština" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Heap_(Datenstruktur)" title="Heap (Datenstruktur) – němčina" lang="de" hreflang="de" data-title="Heap (Datenstruktur)" data-language-autonym="Deutsch" data-language-local-name="němčina" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Heap_(data_structure)" title="Heap (data structure) – angličtina" lang="en" hreflang="en" data-title="Heap (data structure)" data-language-autonym="English" data-language-local-name="angličtina" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Mont%C3%ADculo_(inform%C3%A1tica)" title="Montículo (informática) – španělština" lang="es" hreflang="es" data-title="Montículo (informática)" data-language-autonym="Español" data-language-local-name="španělština" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/Kuhi_(informaatika)" title="Kuhi (informaatika) – estonština" lang="et" hreflang="et" data-title="Kuhi (informaatika)" data-language-autonym="Eesti" data-language-local-name="estonština" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D9%87%D8%B1%D9%85_(%D8%B3%D8%A7%D8%AE%D8%AA%D9%85%D8%A7%D9%86_%D8%AF%D8%A7%D8%AF%D9%87)" title="هرم (ساختمان داده) – perština" lang="fa" hreflang="fa" data-title="هرم (ساختمان داده)" data-language-autonym="فارسی" data-language-local-name="perština" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Keko_(tietorakenne)" title="Keko (tietorakenne) – finština" lang="fi" hreflang="fi" data-title="Keko (tietorakenne)" data-language-autonym="Suomi" data-language-local-name="finština" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Tas_(informatique)" title="Tas (informatique) – francouzština" lang="fr" hreflang="fr" data-title="Tas (informatique)" data-language-autonym="Français" data-language-local-name="francouzština" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%A2%D7%A8%D7%99%D7%9E%D7%94" title="ערימה – hebrejština" lang="he" hreflang="he" data-title="ערימה" data-language-autonym="עברית" data-language-local-name="hebrejština" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://hi.wikipedia.org/wiki/%E0%A4%B9%E0%A5%80%E0%A4%AA" title="हीप – hindština" lang="hi" hreflang="hi" data-title="हीप" data-language-autonym="हिन्दी" data-language-local-name="hindština" class="interlanguage-link-target"><span>हिन्दी</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Kupac_(adatszerkezet)" title="Kupac (adatszerkezet) – maďarština" lang="hu" hreflang="hu" data-title="Kupac (adatszerkezet)" data-language-autonym="Magyar" data-language-local-name="maďarština" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Heap_(struktur_data)" title="Heap (struktur data) – indonéština" lang="id" hreflang="id" data-title="Heap (struktur data)" data-language-autonym="Bahasa Indonesia" data-language-local-name="indonéština" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-is mw-list-item"><a href="https://is.wikipedia.org/wiki/Hr%C3%BAga_(t%C3%B6lvunarfr%C3%A6%C3%B0i)" title="Hrúga (tölvunarfræði) – islandština" lang="is" hreflang="is" data-title="Hrúga (tölvunarfræði)" data-language-autonym="Íslenska" data-language-local-name="islandština" class="interlanguage-link-target"><span>Íslenska</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Heap_(struttura_dati)" title="Heap (struttura dati) – italština" lang="it" hreflang="it" data-title="Heap (struttura dati)" data-language-autonym="Italiano" data-language-local-name="italština" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%83%92%E3%83%BC%E3%83%97" title="ヒープ – japonština" lang="ja" hreflang="ja" data-title="ヒープ" data-language-autonym="日本語" data-language-local-name="japonština" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%ED%9E%99_(%EC%9E%90%EB%A3%8C_%EA%B5%AC%EC%A1%B0)" title="힙 (자료 구조) – korejština" lang="ko" hreflang="ko" data-title="힙 (자료 구조)" data-language-autonym="한국어" data-language-local-name="korejština" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-la mw-list-item"><a href="https://la.wikipedia.org/wiki/Cumulus_(scientia_computatralis)" title="Cumulus (scientia computatralis) – latina" lang="la" hreflang="la" data-title="Cumulus (scientia computatralis)" data-language-autonym="Latina" data-language-local-name="latina" class="interlanguage-link-target"><span>Latina</span></a></li><li class="interlanguage-link interwiki-lmo mw-list-item"><a href="https://lmo.wikipedia.org/wiki/Heap_(strutura_di_dacc)" title="Heap (strutura di dacc) – lombardština" lang="lmo" hreflang="lmo" data-title="Heap (strutura di dacc)" data-language-autonym="Lombard" data-language-local-name="lombardština" class="interlanguage-link-target"><span>Lombard</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/Kr%C5%ABva" title="Krūva – litevština" lang="lt" hreflang="lt" data-title="Krūva" data-language-autonym="Lietuvių" data-language-local-name="litevština" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%B9%E0%B5%80%E0%B4%AA%E0%B5%8D_(%E0%B4%A1%E0%B4%BE%E0%B4%B1%E0%B5%8D%E0%B4%B1%E0%B4%BE_%E0%B4%B8%E0%B5%8D%E0%B4%9F%E0%B5%8D%E0%B4%B0%E0%B4%95%E0%B5%8D%E2%80%8C%E0%B4%9A%E0%B5%8D%E0%B4%9A%E0%B5%BC)" title="ഹീപ് (ഡാറ്റാ സ്ട്രക്ച്ചർ) – malajálamština" lang="ml" hreflang="ml" data-title="ഹീപ് (ഡാറ്റാ സ്ട്രക്ച്ചർ)" data-language-autonym="മലയാളം" data-language-local-name="malajálamština" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-mn mw-list-item"><a href="https://mn.wikipedia.org/wiki/%D0%9E%D0%B2%D0%BE%D0%BE%D0%BB%D0%B3%D0%BE" title="Овоолго – mongolština" lang="mn" hreflang="mn" data-title="Овоолго" data-language-autonym="Монгол" data-language-local-name="mongolština" class="interlanguage-link-target"><span>Монгол</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Heap" title="Heap – nizozemština" lang="nl" hreflang="nl" data-title="Heap" data-language-autonym="Nederlands" data-language-local-name="nizozemština" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Heap" title="Heap – norština (bokmål)" lang="nb" hreflang="nb" data-title="Heap" data-language-autonym="Norsk bokmål" data-language-local-name="norština (bokmål)" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Kopiec_(informatyka)" title="Kopiec (informatyka) – polština" lang="pl" hreflang="pl" data-title="Kopiec (informatyka)" data-language-autonym="Polski" data-language-local-name="polština" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Heap" title="Heap – portugalština" lang="pt" hreflang="pt" data-title="Heap" data-language-autonym="Português" data-language-local-name="portugalština" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9A%D1%83%D1%87%D0%B0_(%D1%81%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%B0_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85)" title="Куча (структура данных) – ruština" lang="ru" hreflang="ru" data-title="Куча (структура данных)" data-language-autonym="Русский" data-language-local-name="ruština" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Heap_(data_structure)" title="Heap (data structure) – Simple English" lang="en-simple" hreflang="en-simple" data-title="Heap (data structure)" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/Halda_(d%C3%A1tov%C3%A1_%C5%A1trukt%C3%BAra)" title="Halda (dátová štruktúra) – slovenština" lang="sk" hreflang="sk" data-title="Halda (dátová štruktúra)" data-language-autonym="Slovenčina" data-language-local-name="slovenština" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/Kopica" title="Kopica – slovinština" lang="sl" hreflang="sl" data-title="Kopica" data-language-autonym="Slovenščina" data-language-local-name="slovinština" class="interlanguage-link-target"><span>Slovenščina</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/Hip_(struktura_podataka)" title="Hip (struktura podataka) – srbština" lang="sr" hreflang="sr" data-title="Hip (struktura podataka)" data-language-autonym="Српски / srpski" data-language-local-name="srbština" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Heap_(datastruktur)" title="Heap (datastruktur) – švédština" lang="sv" hreflang="sv" data-title="Heap (datastruktur)" data-language-autonym="Svenska" data-language-local-name="švédština" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%AE%E0%B8%B5%E0%B8%9B_(%E0%B9%82%E0%B8%84%E0%B8%A3%E0%B8%87%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B8%B9%E0%B8%A5)" title="ฮีป (โครงสร้างข้อมูล) – thajština" lang="th" hreflang="th" data-title="ฮีป (โครงสร้างข้อมูล)" data-language-autonym="ไทย" data-language-local-name="thajština" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/%C3%96bek_(veri_yap%C4%B1s%C4%B1)" title="Öbek (veri yapısı) – turečtina" lang="tr" hreflang="tr" data-title="Öbek (veri yapısı)" data-language-autonym="Türkçe" data-language-local-name="turečtina" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%9A%D1%83%D0%BF%D0%B0_(%D1%81%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%B0_%D0%B4%D0%B0%D0%BD%D0%B8%D1%85)" title="Купа (структура даних) – ukrajinština" lang="uk" hreflang="uk" data-title="Купа (структура даних)" data-language-autonym="Українська" data-language-local-name="ukrajinština" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/%C4%90%E1%BB%91ng_(c%E1%BA%A5u_tr%C3%BAc_d%E1%BB%AF_li%E1%BB%87u)" title="Đống (cấu trúc dữ liệu) – vietnamština" lang="vi" hreflang="vi" data-title="Đống (cấu trúc dữ liệu)" data-language-autonym="Tiếng Việt" data-language-local-name="vietnamština" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E5%A0%86%E7%A9%8D" title="堆積 – čínština" lang="zh" hreflang="zh" data-title="堆積" data-language-autonym="中文" data-language-local-name="čínština" class="interlanguage-link-target"><span>中文</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E5%A0%86%E7%A9%8D%E6%A8%B9" title="堆積樹 – kantonština" lang="yue" hreflang="yue" data-title="堆積樹" data-language-autonym="粵語" data-language-local-name="kantonština" class="interlanguage-link-target"><span>粵語</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q274089#sitelinks-wikipedia" title="Editovat mezijazykové odkazy" class="wbc-editpage">Upravit odkazy</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Jmenné prostory"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Halda_(datov%C3%A1_struktura)" title="Zobrazit obsahovou stránku [c]" accesskey="c"><span>Článek</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Diskuse:Halda_(datov%C3%A1_struktura)&action=edit&redlink=1" rel="discussion" class="new" title="Diskuse ke stránce (stránka neexistuje) [t]" accesskey="t"><span>Diskuse</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Změnit variantu jazyka" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">čeština</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Zobrazení"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Halda_(datov%C3%A1_struktura)"><span>Číst</span></a></li><li id="ca-ve-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit" title="Editovat tuto stránku [v]" accesskey="v"><span>Editovat</span></a></li><li id="ca-edit" class="collapsible vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit" title="Editovat zdrojový kód této stránky [e]" accesskey="e"><span>Editovat zdroj</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=history" title="Starší verze této stránky. [h]" accesskey="h"><span>Zobrazit historii</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Nástroje ke stránce"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Nástroje" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Nástroje</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Nástroje</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">přesunout do postranního panelu</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">skrýt</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Další možnosti" > <div class="vector-menu-heading"> Akce </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Halda_(datov%C3%A1_struktura)"><span>Číst</span></a></li><li id="ca-more-ve-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit" title="Editovat tuto stránku [v]" accesskey="v"><span>Editovat</span></a></li><li id="ca-more-edit" class="collapsible vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit" title="Editovat zdrojový kód této stránky [e]" accesskey="e"><span>Editovat zdroj</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=history"><span>Zobrazit historii</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> Obecné </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Speci%C3%A1ln%C3%AD:Co_odkazuje_na/Halda_(datov%C3%A1_struktura)" title="Seznam všech wikistránek, které sem odkazují [j]" accesskey="j"><span>Odkazuje sem</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Speci%C3%A1ln%C3%AD:Souvisej%C3%ADc%C3%AD_zm%C4%9Bny/Halda_(datov%C3%A1_struktura)" rel="nofollow" title="Nedávné změny stránek, na které je odkazováno [k]" accesskey="k"><span>Související změny</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=cs" title="Nahrát obrázky či jiná multimédia [u]" accesskey="u"><span>Načíst soubor</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Speci%C3%A1ln%C3%AD:Speci%C3%A1ln%C3%AD_str%C3%A1nky" title="Seznam všech speciálních stránek [q]" accesskey="q"><span>Speciální stránky</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&oldid=24392820" title="Trvalý odkaz na současnou verzi této stránky"><span>Trvalý odkaz</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=info" title="Více informací o této stránce"><span>Informace o stránce</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Speci%C3%A1ln%C3%AD:Citovat&page=Halda_%28datov%C3%A1_struktura%29&id=24392820&wpFormIdentifier=titleform" title="Informace o tom, jak citovat tuto stránku"><span>Citovat stránku</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Speci%C3%A1ln%C3%AD:UrlShortener&url=https%3A%2F%2Fcs.wikipedia.org%2Fwiki%2FHalda_%28datov%25C3%25A1_struktura%29"><span>Získat zkrácené URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Speci%C3%A1ln%C3%AD:QrCode&url=https%3A%2F%2Fcs.wikipedia.org%2Fwiki%2FHalda_%28datov%25C3%25A1_struktura%29"><span>Stáhnout QR kód</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Tisk/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Speci%C3%A1ln%C3%AD:Kniha&bookcmd=book_creator&referer=Halda+%28datov%C3%A1+struktura%29"><span>Vytvořit knihu</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Speci%C3%A1ln%C3%AD:DownloadAsPdf&page=Halda_%28datov%C3%A1_struktura%29&action=show-download-screen"><span>Stáhnout jako PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&printable=yes" title="Tato stránka v podobě vhodné k tisku [p]" accesskey="p"><span>Verze k tisku</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> Na jiných projektech </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:Heap_data_structures" hreflang="en"><span>Wikimedia Commons</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q274089" title="Odkaz na propojenou položku datového úložiště [g]" accesskey="g"><span>Položka Wikidat</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Nástroje ke stránce"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Vzhled"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Vzhled</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">přesunout do postranního panelu</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">skrýt</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">Z Wikipedie, otevřené encyklopedie</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="cs" dir="ltr"><div class="uvodni-upozorneni hatnote noprint">Tento článek je o haldě jako <a href="/wiki/Strom_(datov%C3%A1_struktura)" title="Strom (datová struktura)">stromové datové struktuře</a>. O haldě jako paměťovém prostoru v počítačových programech pojednává článek <a href="/wiki/Dynamick%C3%A1_alokace_pam%C4%9Bti" title="Dynamická alokace paměti">Dynamická alokace paměti</a>.</div> <p><b>Halda</b> (anglicky <i>heap</i>) je v <a href="/wiki/Informatika" title="Informatika">informatice</a> <a href="/wiki/Strom_(datov%C3%A1_struktura)" title="Strom (datová struktura)">stromová</a> <a href="/wiki/Datov%C3%A1_struktura" title="Datová struktura">datová struktura</a> splňující tzv. <i>vlastnost haldy</i>: pokud je <i>B</i> potomek <i>A</i>, pak <i>x(A)</i> >= <i>x(B)</i>. To znamená, že v kořenu stromu je vždy prvek s nejvyšším klíčem (klíč udává funkce <i>x</i>). Taková halda se pak někdy označuje jako <i>max heap</i>, halda s reverzním pořadím prvků se analogicky nazývá <i>min heap</i>. Díky této vlastnosti se haldy často používají na implementaci <a href="/wiki/Prioritn%C3%AD_fronta" title="Prioritní fronta">prioritní fronty</a>. Efektivita operací s haldou je klíčová pro mnoho <a href="/wiki/Algoritmus" title="Algoritmus">algoritmů</a>. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Operace_s_haldou">Operace s haldou</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=1" title="Editace sekce: Operace s haldou" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=1" title="Editovat zdrojový kód sekce Operace s haldou"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>INSERT - přidání nového prvku do haldy</li> <li>DELETE MAX nebo DELETE MIN - vyjmutí kořenu v max heap nebo v min heap</li> <li>DELETE(v) - smaže uzel „v“</li> <li>MIN, MAX - vrátí minimální resp. maximální klíč v haldě</li> <li>DECREASE KEY(v, okolik) - zmenšení klíče uzlu „v“ o hodnotu „okolik“</li> <li>INCREASE KEY(v, okolik) - zvětšení klíče uzlu „v“ o hodnotu „okolik“</li> <li>MERGE - spojení dvou hald do jedné nové validní haldy obsahující všechny prvky obou původních</li> <li>MAKE - dostane pole N prvků a vytvoří z nich haldu</li></ul> <div class="mw-heading mw-heading2"><h2 id="Popis_haldy">Popis haldy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=2" title="Editace sekce: Popis haldy" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=2" title="Editovat zdrojový kód sekce Popis haldy"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Haldu bychom mohli tedy definovat jako datovou strukturu splňující dvě základní podmínky: </p> <ul><li>lokální podmínku na uspořádání - prvek reprezentující otce je menší než prvek reprezentovaný synem apod.</li> <li>strukturální podmínku na <a href="/wiki/Strom_(datov%C3%A1_struktura)" title="Strom (datová struktura)">stromy</a>, ze kterých jsou vytvořené</li></ul> <p>Právě podle těchto podmínek se haldy rozdělují na <a href="/w/index.php?title=D-regul%C3%A1rn%C3%AD_halda&action=edit&redlink=1" class="new" title="D-regulární halda (stránka neexistuje)">d-regulární</a>, <a href="/wiki/Fibonacciho_halda" title="Fibonacciho halda">Fibonacciho</a>, <a href="/w/index.php?title=Leftist_halda&action=edit&redlink=1" class="new" title="Leftist halda (stránka neexistuje)">Leftist</a> a další (mohou se lišit jak lokální, tak strukturální podmínkou). </p><p>Jak již bylo naznačeno, rozlišujeme haldy Min-Heap a Max-Heap. </p> <ul><li>U Min-Heap jsou klíče dětí jednoho uzlu vždy větší než klíče svého otce. To způsobuje, že na kořenech stromu lze nalézt pouze prvek s minimálním klíčem.</li> <li>Opačně je pro Max-Heap stanovena podmínka, že klíče dětí jednoho uzlu musí být vždy menší než klíče jejich otce. Zde se na kořeni stromu vždy nachází prvek s maximálním klíčem.</li></ul> <center> <table> <caption>Příklady Min-Heap a Max-Heap </caption> <tbody><tr> <td><figure class="mw-default-size mw-halign-right" typeof="mw:File"><a href="/wiki/Soubor:Minheaplampul.jpg" class="mw-file-description" title="Min heap"><img alt="Min heap" src="//upload.wikimedia.org/wikipedia/commons/1/14/Minheaplampul.jpg" decoding="async" width="221" height="143" class="mw-file-element" data-file-width="221" data-file-height="143" /></a><figcaption>Min heap</figcaption></figure> </td> <td><figure class="mw-default-size mw-halign-right" typeof="mw:File"><a href="/wiki/Soubor:Maxheaplampul.jpg" class="mw-file-description" title="Max heap"><img alt="Max heap" src="//upload.wikimedia.org/wikipedia/commons/3/3f/Maxheaplampul.jpg" decoding="async" width="221" height="143" class="mw-file-element" data-file-width="221" data-file-height="143" /></a><figcaption>Max heap</figcaption></figure> </td></tr></tbody></table> </center> <p>Matematicky se u obou variant jedná pouze o rozdíl v jejich opačném pořadí prvků. Protože je definice vzestupně i sestupně libovolná, je pouze otázkou interpretace, zda se v konkrétní implementaci jedná o Min-Heap nebo o Max-Heap. </p> <div class="mw-heading mw-heading2"><h2 id="Obousměrné_haldy_(Double_heaps)"><span id="Obousm.C4.9Brn.C3.A9_haldy_.28Double_heaps.29"></span>Obousměrné haldy (Double heaps)</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=3" title="Editace sekce: Obousměrné haldy (Double heaps)" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=3" title="Editovat zdrojový kód sekce Obousměrné haldy (Double heaps)"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Často se stává, že halda má zobrazit podmínku v obou směrech. V tomto případě se jednoduše vytvoří haldy dvě a uspořádají se podle větší a menší relace. Taková struktura je pak označována jako <i>Double heap</i> nebo krátce <i>Deap</i>. </p><p>Při použití <i>Double heaps</i> je třeba dávat pozor na to, že ne každá <a href="/wiki/Implementace" title="Implementace">implementace</a> haldy si pro jednotlivé operace zachová svůj průběh. Například Fibonacciho haldy s konstantním amortizovaným průběhem podporují pouze decreaseKey pro snížení klíčů. Všeobecný changeKey pro změnu klíče, který je vyžadován v případě Double heap, potřebuje ale amortizovaně minimálně logaritmický čas. </p><p>Variantou hald, které splňují podmínku haldy pouze částečně, nebo odchylně jsou tzv. Min-Max-Heap. Jedná se o Double heap, které díky odchylné formě podmínky haldy mohou udržovat data pouze v jednom stromu. </p> <div class="mw-heading mw-heading2"><h2 id="Varianty_haldy">Varianty haldy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=4" title="Editace sekce: Varianty haldy" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=4" title="Editovat zdrojový kód sekce Varianty haldy"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Existuje mnoho druhů hald s rozdílným průběhem pro různé operace. Příklady hald: </p> <ul><li><a href="/w/index.php?title=D-regul%C3%A1rn%C3%AD_halda&action=edit&redlink=1" class="new" title="D-regulární halda (stránka neexistuje)">d-regulární halda</a>, d=2 <a href="/wiki/Bin%C3%A1rn%C3%AD_halda" title="Binární halda">binární</a></li> <li><a href="/wiki/Binomi%C3%A1ln%C3%AD_halda" title="Binomiální halda">Binomiální halda</a></li> <li><a href="/wiki/Fibonacciho_halda" title="Fibonacciho halda">Fibonacciho halda</a></li> <li><a href="/w/index.php?title=Leftist_halda&action=edit&redlink=1" class="new" title="Leftist halda (stránka neexistuje)">Leftist halda</a></li> <li><a href="/w/index.php?title=Pairing&action=edit&redlink=1" class="new" title="Pairing (stránka neexistuje)">Pairing</a></li> <li><a href="/w/index.php?title=Soft_halda&action=edit&redlink=1" class="new" title="Soft halda (stránka neexistuje)">Soft halda</a></li> <li><a href="/w/index.php?title=2-3_Halda&action=edit&redlink=1" class="new" title="2-3 Halda (stránka neexistuje)">2-3 Halda</a></li> <li><a href="/w/index.php?title=Treap&action=edit&redlink=1" class="new" title="Treap (stránka neexistuje)">Treap</a></li> <li><a href="/w/index.php?title=Beap&action=edit&redlink=1" class="new" title="Beap (stránka neexistuje)">Beap</a></li> <li><a href="/w/index.php?title=Skew_halda&action=edit&redlink=1" class="new" title="Skew halda (stránka neexistuje)">Skew halda</a></li> <li><a href="/w/index.php?title=Q-Halda&action=edit&redlink=1" class="new" title="Q-Halda (stránka neexistuje)">Q-Halda</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Porovnání_teoretických_hranic_složitostí_pro_jednotlivé_varianty"><span id="Porovn.C3.A1n.C3.AD_teoretick.C3.BDch_hranic_slo.C5.BEitost.C3.AD_pro_jednotliv.C3.A9_varianty"></span>Porovnání teoretických hranic složitostí pro jednotlivé varianty</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=5" title="Editace sekce: Porovnání teoretických hranic složitostí pro jednotlivé varianty" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=5" title="Editovat zdrojový kód sekce Porovnání teoretických hranic složitostí pro jednotlivé varianty"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>U Pairing, <a href="/wiki/Bin%C3%A1rn%C3%AD_halda" title="Binární halda">binární</a> a binomiální haldy jde o <a href="/wiki/Asymptotick%C3%A1_slo%C5%BEitost" title="Asymptotická složitost">složitosti</a> v nejhorším případě<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>. O amortizované složitosti u Fibonacciho a Leftist haldy. O(f) dává asymptotickou horní hranici a Θ(f) je asymptoticky přesná (až na multiplikativní konstantu) složitost. V tabulce předpokládáme použití Min Heap. </p> <table class="wikitable"> <tbody><tr> <th>Operace </th> <th>Binární </th> <th>Binomiální </th> <th>Fibonacciho </th> <th>Pairing </th> <th>Leftist </th> <th>2-3 </th> <th>Treap </th> <th>Beap </th></tr> <tr> <td>createHeap </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span></td> <td></td> <td></td> <td></td> <td> </td></tr> <tr> <td>findMin </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> nebo Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span></td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td></td> <td></td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td></tr> <tr> <td>deleteMin </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6dcf3083121187f661e0add2f50615aa21428e68" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.204ex; height:2.843ex;" alt="{\displaystyle (n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span></td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td></tr> <tr> <td>insert </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> nebo Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span></td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td></tr> <tr> <td>decrease-key </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> nebo Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span></td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td></td> <td> </td></tr> <tr> <td>merge </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6dcf3083121187f661e0add2f50615aa21428e68" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.204ex; height:2.843ex;" alt="{\displaystyle (n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (1)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (1)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a25115739469707c4758b189fe310a750092a80a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.972ex; height:2.843ex;" alt="{\displaystyle (1)}"></span> </td> <td>Θ<span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo stretchy="false">(</mo> <mi>log</mi> <mo>⁡<!-- --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle (\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f92166a0c67bebc0d93429917673f7d73ea420b1" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.563ex; height:2.843ex;" alt="{\displaystyle (\log n)}"></span></td> <td></td> <td></td> <td> </td></tr></tbody></table> <div class="mw-heading mw-heading2"><h2 id="Využití_haldy"><span id="Vyu.C5.BEit.C3.AD_haldy"></span>Využití haldy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=6" title="Editace sekce: Využití haldy" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=6" title="Editovat zdrojový kód sekce Využití haldy"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Halda má široké spektrum využití a patří mezi oblíbené datové struktury pro mnoho aplikací. </p> <ul><li><b><a href="/wiki/Heapsort" class="mw-redirect" title="Heapsort">Heapsort</a></b>: řadicí algoritmus.</li> <li><b>Výběrový algoritmus</b>: Hledání minima, maxima nebo obou, mediánu nebo dokonce jakéhokoli k-prvku (to sice lze, ale je to pomalé) a může být prováděno dynamicky.</li> <li><b>implementace <a href="/wiki/Dijkstr%C5%AFv_algoritmus" title="Dijkstrův algoritmus">Dijkstrova algoritmu</a></b> - využití jakékoli haldy, ale využití Fibonacciho haldy dává pro řídké grafy lepší časovou složitost.</li> <li><b>implementace <a href="/wiki/Jarn%C3%ADk%C5%AFv_algoritmus" title="Jarníkův algoritmus">Jarníkova algoritmu</a></b></li> <li><b><a href="/wiki/Prioritn%C3%AD_fronta" title="Prioritní fronta">Prioritní fronty</a></b>: využití haldy pro stanovení front úkolů například u serverů nebo provozních systémů</li> <li><b><a href="/wiki/Hladov%C3%BD_algoritmus" title="Hladový algoritmus">Hladové algoritmy</a></b>: halda představuje ideální datovou strukturu pro tzv. hladové algoritmy, které se řídí lokálními optimalizovanými rozhodnutími.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Implementace_haldy">Implementace haldy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=7" title="Editace sekce: Implementace haldy" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=7" title="Editovat zdrojový kód sekce Implementace haldy"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Standard_Template_Library" title="Standard Template Library">Standard Template Library</a> jazyka <a href="/wiki/C%2B%2B" title="C++">C++</a> poskytuje algoritmy make_heap, push_heap a pop_heap pro binární haldy, které pracují na iterátorech s náhodným přístupem. </p> <div class="mw-heading mw-heading3"><h3 id="Implementace_binární_haldy"><span id="Implementace_bin.C3.A1rn.C3.AD_haldy"></span>Implementace binární haldy</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=8" title="Editace sekce: Implementace binární haldy" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=8" title="Editovat zdrojový kód sekce Implementace binární haldy"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Bin%C3%A1rn%C3%AD_halda" title="Binární halda">Binární haldy</a> mohou být implementovány jednoduše pomocí <a href="/wiki/Pole_(datov%C3%A1_struktura)" title="Pole (datová struktura)">pole</a>. </p><p><span class="mw-default-size" typeof="mw:File"><a href="/wiki/Soubor:Binary_tree_in_array.svg" class="mw-file-description" title="Reprezentace Bin. haldy polem"><img alt="Reprezentace Bin. haldy polem" src="//upload.wikimedia.org/wikipedia/commons/thumb/8/86/Binary_tree_in_array.svg/370px-Binary_tree_in_array.svg.png" decoding="async" width="370" height="93" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/8/86/Binary_tree_in_array.svg/555px-Binary_tree_in_array.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/8/86/Binary_tree_in_array.svg/740px-Binary_tree_in_array.svg.png 2x" data-file-width="370" data-file-height="93" /></a></span> </p><p>První nebo poslední prvek bude obsahovat kořen. Následující dva prvky pole obsahují jeho potomky. Následující čtyři obsahují další čtyři potomky předchozích dvou potomků, atd. A tak potomci uzlu na pozici n budou na pozici 2n a 2n+1 v polích indexovaných od jedničky nebo 2n+1 a 2n+2 v polích indexovaných od nuly. Vyvažování haldy je prováděno záměnou prvků, které nejsou umístěny ve správném pořadí. Tak, jako můžeme sestavit haldu z pole bez využití další paměti (například pro uzly), heapsort může být také použít pro třídění pole na místě. Další výhoda haldy v některých aplikacích je, že sestavení hald může být prováděno v lineárním čase použitím <a href="/w/index.php?title=Tarjan%C5%AFv_algoritmus&action=edit&redlink=1" class="new" title="Tarjanův algoritmus (stránka neexistuje)">Tarjanova algoritmu</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Poznámky"><span id="Pozn.C3.A1mky"></span>Poznámky</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=9" title="Editace sekce: Poznámky" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=9" title="Editovat zdrojový kód sekce Poznámky"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-references-wrap"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text"> Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest (1990): Introduction to algorithms. MIT Press / McGraw-Hill.</span> </li> </ol></div> <div class="mw-heading mw-heading2"><h2 id="Externí_odkazy"><span id="Extern.C3.AD_odkazy"></span>Externí odkazy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&veaction=edit&section=10" title="Editace sekce: Externí odkazy" class="mw-editsection-visualeditor"><span>editovat</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Halda_(datov%C3%A1_struktura)&action=edit&section=10" title="Editovat zdrojový kód sekce Externí odkazy"><span>editovat zdroj</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><span class="wd"><span class="sisterproject sisterproject-commons"><span class="sisterproject_image"><span typeof="mw:File"><a href="/wiki/Wikimedia_Commons" title="Wikimedia Commons"><img alt="Logo Wikimedia Commons" src="//upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/12px-Commons-logo.svg.png" decoding="async" width="12" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/18px-Commons-logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/24px-Commons-logo.svg.png 2x" data-file-width="1024" data-file-height="1376" /></a></span></span> <span class="sisterproject_text">Obrázky, zvuky či videa k tématu <span class="sisterproject_text_target"><a href="https://commons.wikimedia.org/wiki/Category:Heap_data_structures" class="extiw" title="c:Category:Heap data structures">halda</a></span> na <a href="/wiki/Wikimedia_Commons" title="Wikimedia Commons">Wikimedia Commons</a></span></span></span><i> </i></li> <li><a rel="nofollow" class="external text" href="https://people.ksp.sk/~kuko/gnarley-trees/Heap.html">Vizualizace haldy</a></li> <li><a rel="nofollow" class="external autonumber" href="https://web.archive.org/web/20070617093810/http://kam.mff.cuni.cz/~kuba/ka/halda.pdf">[1]</a> (Soubor na stažení)</li> <li><a rel="nofollow" class="external autonumber" href="http://artax.karlin.mff.cuni.cz/~pvac7645/homepage/projects/souborka/main.pdf">[2]</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20070207074725/http://artax.karlin.mff.cuni.cz/~pvac7645/homepage/projects/souborka/main.pdf">Archivováno</a> 7. 2. 2007 na <a href="/wiki/Internet_Archive" title="Internet Archive">Wayback Machine</a>. (Soubor na stažení)</li> <li><a rel="nofollow" class="external text" href="http://mj.ucw.cz/vyuka/ga/">Skripta z grafových algoritmů obsahující popis Q-Hald</a></li></ul> <div class="navbox noprint" title="Stromy_Inf"><table title="" class="navbox-navbox mw-collapsible autocollapse nowraplinks noprint" cellspacing="0" data-collapsetext="skrýt" data-expandtext="zobrazit"><style data-mw-deduplicate="TemplateStyles:r17064757">.mw-parser-output .navbox-title .mw-collapsible-toggle{font-weight:normal}</style><tbody><tr> <th class="navbox-title" colspan="2"> <span class="navbox-titletext"><a href="/wiki/Strom_(datov%C3%A1_struktura)" title="Strom (datová struktura)">Stromové datové struktury</a></span> </th> </tr><tr class="navbox-padding"><td></td></tr> <tr> <td class="navbox-group"><a href="/w/index.php?title=Vyhled%C3%A1vac%C3%AD_stromy&action=edit&redlink=1" class="new" title="Vyhledávací stromy (stránka neexistuje)">Vyhledávací stromy</a><br />(<a href="/wiki/Mno%C5%BEina_(datov%C3%A1_struktura)" title="Množina (datová struktura)">dynamické množiny</a>/ <a href="/wiki/Asociativn%C3%AD_pole" title="Asociativní pole">asociativní pole</a>)</td> <td class="navbox-list navbox-odd"> <div> <a href="/wiki/2-3_strom" title="2-3 strom">2–3</a> • <a href="/w/index.php?title=2%E2%80%933%E2%80%934_strom&action=edit&redlink=1" class="new" title="2–3–4 strom (stránka neexistuje)">2–3–4</a> • <a href="/wiki/AA_strom" title="AA strom">AA</a> • <a href="/wiki/(a,b)-strom" title="(a,b)-strom">(a,b)</a> • <a href="/wiki/AVL-strom" title="AVL-strom">AVL</a> • <a href="/wiki/B-strom" title="B-strom">B</a> • <a href="/wiki/B%2B_strom" title="B+ strom">B+</a> • <a href="/wiki/B*_strom" title="B* strom">B*</a> • <a href="/w/index.php?title=Bx-strom&action=edit&redlink=1" class="new" title="Bx-strom (stránka neexistuje)">B<sup>x</sup></a> • (<a href="/w/index.php?title=Optim%C3%A1ln%C3%AD_bin%C3%A1rn%C3%AD_vyhled%C3%A1vac%C3%AD_strom&action=edit&redlink=1" class="new" title="Optimální binární vyhledávací strom (stránka neexistuje)">Optimální</a>) <a href="/wiki/Bin%C3%A1rn%C3%AD_vyhled%C3%A1vac%C3%AD_strom" title="Binární vyhledávací strom">Binární vyhledávací</a> • <a href="/w/index.php?title=Dancing_strom&action=edit&redlink=1" class="new" title="Dancing strom (stránka neexistuje)">Dancing</a> • <a href="/w/index.php?title=HTree&action=edit&redlink=1" class="new" title="HTree (stránka neexistuje)">HTree</a> • <a href="/w/index.php?title=Intervalov%C3%BD_strom&action=edit&redlink=1" class="new" title="Intervalový strom (stránka neexistuje)">Intervalový</a> • <a href="/w/index.php?title=Stromy_s_po%C5%99ad%C3%ADm&action=edit&redlink=1" class="new" title="Stromy s pořadím (stránka neexistuje)">Stromy s pořadím</a> (Order statistic) • (<a href="/w/index.php?title=Doleva_p%C5%99ev%C3%A1%C5%BEen%C3%BD_%C4%8Derveno-%C4%8Dern%C3%BD_strom&action=edit&redlink=1" class="new" title="Doleva převážený červeno-černý strom (stránka neexistuje)">Doleva převážený</a>) <a href="/wiki/%C4%8Cerveno-%C4%8Dern%C3%BD_strom" title="Červeno-černý strom">Červeno-černý</a> • <a href="/wiki/Scapegoat_strom" title="Scapegoat strom">Scapegoat</a> • <a href="/wiki/Splay_strom" title="Splay strom">Splay</a> • <a href="/w/index.php?title=T-strom&action=edit&redlink=1" class="new" title="T-strom (stránka neexistuje)">T</a> • <a href="/w/index.php?title=Treap&action=edit&redlink=1" class="new" title="Treap (stránka neexistuje)">Treap</a> • <a href="/w/index.php?title=UB-strom&action=edit&redlink=1" class="new" title="UB-strom (stránka neexistuje)">UB</a> • <a href="/w/index.php?title=V%C3%A1hov%C4%9B_vyv%C3%A1%C5%BEen%C3%BD_strom&action=edit&redlink=1" class="new" title="Váhově vyvážený strom (stránka neexistuje)">Váhově vyvážený</a> (tj. BB[α])</div> </td> </tr><tr class="navbox-padding"><td></td></tr> <tr> <td class="navbox-group"><a class="mw-selflink selflink">Haldy</a></td> <td class="navbox-list navbox-even"> <div> <a href="/wiki/Bin%C3%A1rn%C3%AD_halda" title="Binární halda">Binární</a> • <a href="/wiki/Binomi%C3%A1ln%C3%AD_halda" title="Binomiální halda">Binomiální</a> • <a href="/w/index.php?title=Brodalova_halda&action=edit&redlink=1" class="new" title="Brodalova halda (stránka neexistuje)">Brodal</a> • <a href="/wiki/Fibonacciho_halda" title="Fibonacciho halda">Fibonacciho</a> • <a href="/w/index.php?title=Leftist_strom&action=edit&redlink=1" class="new" title="Leftist strom (stránka neexistuje)">Leftist</a> • <a href="/w/index.php?title=Pairing_halda&action=edit&redlink=1" class="new" title="Pairing halda (stránka neexistuje)">Pairing</a> • <a href="/w/index.php?title=Skew_halda&action=edit&redlink=1" class="new" title="Skew halda (stránka neexistuje)">Skew</a> • <a href="/w/index.php?title=Van_Emde_Boas%C5%AFv_strom&action=edit&redlink=1" class="new" title="Van Emde Boasův strom (stránka neexistuje)">Van Emde Boasův strom</a> • <a href="/w/index.php?title=Weak_halda&action=edit&redlink=1" class="new" title="Weak halda (stránka neexistuje)">Slabá</a></div> </td> </tr><tr class="navbox-padding"><td></td></tr> <tr> <td class="navbox-group"><a href="/wiki/Trie" title="Trie">Trie</a></td> <td class="navbox-list navbox-even"> <div> <a href="/w/index.php?title=Ctrie_strom&action=edit&redlink=1" class="new" title="Ctrie strom (stránka neexistuje)">Ctrie</a> • <a href="/w/index.php?title=C-trie_strom&action=edit&redlink=1" class="new" title="C-trie strom (stránka neexistuje)">C-trie</a> • <a href="/w/index.php?title=Ha%C5%A1ovac%C3%AD_strom_(persistent_data_structure)&action=edit&redlink=1" class="new" title="Hašovací strom (persistent data structure) (stránka neexistuje)">Hašovací</a> • <a href="/wiki/Komprimovan%C3%A1_trie" title="Komprimovaná trie">Komprimovaná trie</a> (tj. Patricia) • <a href="/wiki/Sufixov%C3%BD_strom" title="Sufixový strom">Sufixový</a> (tj. PAT) • <a href="/w/index.php?title=Tern%C3%A1ln%C3%AD_vyhled%C3%A1vac%C3%AD_strom&action=edit&redlink=1" class="new" title="Ternální vyhledávací strom (stránka neexistuje)">Ternální hledání</a> • <a href="/w/index.php?title=X-fast_strom&action=edit&redlink=1" class="new" title="X-fast strom (stránka neexistuje)">X-fast</a> • <a href="/w/index.php?title=Y-fast_strom&action=edit&redlink=1" class="new" title="Y-fast strom (stránka neexistuje)">Y-fast</a></div> </td> </tr><tr class="navbox-padding"><td></td></tr> <tr> <td class="navbox-group"><a href="/wiki/Prostorov%C3%BD_index" title="Prostorový index">Prostorové indexační</a> stromy</td> <td class="navbox-list navbox-odd"> <div> <a href="/w/index.php?title=Ball_strom&action=edit&redlink=1" class="new" title="Ball strom (stránka neexistuje)">Ball</a> • <a href="/w/index.php?title=BK-strom&action=edit&redlink=1" class="new" title="BK-strom (stránka neexistuje)">BK</a> • <a href="/wiki/BSP_(po%C4%8D%C3%ADta%C4%8De)" title="BSP (počítače)">BSP</a> • <a href="/w/index.php?title=Kart%C3%A9zsk%C3%BD_strom&action=edit&redlink=1" class="new" title="Kartézský strom (stránka neexistuje)">Kartézský</a> • <a href="/w/index.php?title=Hilbert%C5%AFv_R-strom&action=edit&redlink=1" class="new" title="Hilbertův R-strom (stránka neexistuje)">Hilbertův R</a> • <a href="/w/index.php?title=K-d_strom&action=edit&redlink=1" class="new" title="K-d strom (stránka neexistuje)"><i>k</i>-d</a> (<a href="/w/index.php?title=Implicitn%C3%AD_k-d_strom&action=edit&redlink=1" class="new" title="Implicitní k-d strom (stránka neexistuje)">implicitní <i>k</i>-d</a>) • <a href="/w/index.php?title=M-strom&action=edit&redlink=1" class="new" title="M-strom (stránka neexistuje)">M</a> • <a href="/w/index.php?title=Metrick%C3%BD_strom&action=edit&redlink=1" class="new" title="Metrický strom (stránka neexistuje)">Metrický</a> • <a href="/w/index.php?title=MVP_strom&action=edit&redlink=1" class="new" title="MVP strom (stránka neexistuje)">MVP</a> • <a href="/w/index.php?title=Okt%C3%A1lov%C3%BD_strom&action=edit&redlink=1" class="new" title="Oktálový strom (stránka neexistuje)">Oktálový</a> (Octree) • <a href="/w/index.php?title=PH_strom&action=edit&redlink=1" class="new" title="PH strom (stránka neexistuje)">PH</a> • <a href="/w/index.php?title=Prioritn%C3%AD_R-strom&action=edit&redlink=1" class="new" title="Prioritní R-strom (stránka neexistuje)">Prioritní R</a> • <a href="/w/index.php?title=%C4%8Cty%C5%99strom&action=edit&redlink=1" class="new" title="Čtyřstrom (stránka neexistuje)">Čtyřstrom</a> (Quadtree) • <a href="/wiki/R-strom" title="R-strom">R</a> • <a href="/w/index.php?title=R%2B_strom&action=edit&redlink=1" class="new" title="R+ strom (stránka neexistuje)">R+</a> • <a href="/w/index.php?title=R*_strom&action=edit&redlink=1" class="new" title="R* strom (stránka neexistuje)">R*</a> • <a href="/w/index.php?title=Segmentov%C3%BD_strom&action=edit&redlink=1" class="new" title="Segmentový strom (stránka neexistuje)">Segmentový</a> • <a href="/w/index.php?title=VP_strom&action=edit&redlink=1" class="new" title="VP strom (stránka neexistuje)">VP</a> (vantage-point) • <a href="/w/index.php?title=X-strom&action=edit&redlink=1" class="new" title="X-strom (stránka neexistuje)">X</a></div> </td> </tr><tr class="navbox-padding"><td></td></tr> <tr> <td class="navbox-group">Jiné stromy</td> <td class="navbox-list navbox-even"> <div> <a href="/w/index.php?title=Strom_pokryt%C3%AD&action=edit&redlink=1" class="new" title="Strom pokrytí (stránka neexistuje)">Strom pokrytí</a> • <a href="/w/index.php?title=Obousm%C4%9Brn%C4%9B_prov%C3%A1zan%C3%BD_strom&action=edit&redlink=1" class="new" title="Obousměrně provázaný strom (stránka neexistuje)">Obousměrně provázaný</a> (Doubly chained tree) • <a href="/w/index.php?title=Exponenci%C3%A1ln%C3%AD_strom&action=edit&redlink=1" class="new" title="Exponenciální strom (stránka neexistuje)">Exponenciální</a> • <a href="/w/index.php?title=Fenwick%C5%AFv_strom&action=edit&redlink=1" class="new" title="Fenwickův strom (stránka neexistuje)">Fenwickův</a> • (<a href="/w/index.php?title=Bin%C3%A1rn%C3%AD_strom_s_prstem&action=edit&redlink=1" class="new" title="Binární strom s prstem (stránka neexistuje)">Binární</a>) <a href="/w/index.php?title=Strom_s_prstem&action=edit&redlink=1" class="new" title="Strom s prstem (stránka neexistuje)">Strom s prstem</a> • <a href="/w/index.php?title=Frakt%C3%A1lov%C3%BD_indexov%C3%BD_strom&action=edit&redlink=1" class="new" title="Fraktálový indexový strom (stránka neexistuje)">Fraktálový indexový</a> • <a href="/w/index.php?title=F%C3%BAzn%C3%AD_strom&action=edit&redlink=1" class="new" title="Fúzní strom (stránka neexistuje)">Fúzní</a> (Fusion tree) • <a href="/w/index.php?title=Ha%C5%A1ovac%C3%AD_kalend%C3%A1%C5%99&action=edit&redlink=1" class="new" title="Hašovací kalendář (stránka neexistuje)">Hašovací kalendář</a> • <a href="/w/index.php?title=IDistance&action=edit&redlink=1" class="new" title="IDistance (stránka neexistuje)">iDistance</a> • <a href="/w/index.php?title=K-%C3%A1rn%C3%AD_strom&action=edit&redlink=1" class="new" title="K-ární strom (stránka neexistuje)">K-ární</a> • <a href="/w/index.php?title=Knuth%C5%AFv_transformovan%C3%BD_strom&action=edit&redlink=1" class="new" title="Knuthův transformovaný strom (stránka neexistuje)">Knuthův transformovaný</a> (Left-child right-sibling binary tree) • <a href="/w/index.php?title=Link/cut_strom&action=edit&redlink=1" class="new" title="Link/cut strom (stránka neexistuje)">Link/cut</a> • <a href="/w/index.php?title=Log-strukturovan%C3%BD_spojovac%C3%AD_strom&action=edit&redlink=1" class="new" title="Log-strukturovaný spojovací strom (stránka neexistuje)">Log-strukturovaný spojovací</a> • <a href="/wiki/Ha%C5%A1ov%C3%BD_strom" title="Hašový strom">Hašový Merkleův</a> (<a href="/wiki/Tiger_(hash)" title="Tiger (hash)">TTH</a>) • <a href="/w/index.php?title=PQ_strom&action=edit&redlink=1" class="new" title="PQ strom (stránka neexistuje)">PQ</a> • <a href="/w/index.php?title=Rozsahov%C3%BD_strom&action=edit&redlink=1" class="new" title="Rozsahový strom (stránka neexistuje)">Rozsahový</a> (Range) • <a href="/w/index.php?title=SPQR_strom&action=edit&redlink=1" class="new" title="SPQR strom (stránka neexistuje)">SPQR</a> • <a href="/w/index.php?title=Top_strom&action=edit&redlink=1" class="new" title="Top strom (stránka neexistuje)">Top</a> (Horní strom)</div> </td> </tr><tr class="navbox-padding"><td></td></tr> <tr><td class="navbox-abovebelow" colspan="2"><a href="/wiki/Kategorie:Stromy_(datov%C3%A9_struktury)" title="Kategorie:Stromy (datové struktury)">Kategorie:Stromy (dat. strukt.)</a></td></tr></tbody></table> </div> <style data-mw-deduplicate="TemplateStyles:r23078045">.mw-parser-output .navbox2{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox2 .navbox2{margin-top:0}.mw-parser-output .navbox2+.navbox2{margin-top:-1px}.mw-parser-output .navbox2-inner,.mw-parser-output .navbox2-subgroup{width:100%}.mw-parser-output .navbox2-group,.mw-parser-output .navbox2-title,.mw-parser-output .navbox2-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output th.navbox2-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox2,.mw-parser-output .navbox2-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox2-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output tr+tr>.navbox2-abovebelow,.mw-parser-output tr+tr>.navbox2-group,.mw-parser-output tr+tr>.navbox2-image,.mw-parser-output tr+tr>.navbox2-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox2 th,.mw-parser-output .navbox2-title{background-color:#e0e0e0}.mw-parser-output .navbox2-abovebelow,.mw-parser-output th.navbox2-group,.mw-parser-output .navbox2-subgroup .navbox2-title{background-color:#e7e7e7}.mw-parser-output .navbox2-subgroup .navbox2-title{font-size:88%}.mw-parser-output .navbox2-subgroup .navbox2-group,.mw-parser-output .navbox2-subgroup .navbox2-abovebelow{background-color:#f0f0f0}.mw-parser-output .navbox2-even{background-color:#f7f7f7}.mw-parser-output .navbox2-odd{background-color:transparent}.mw-parser-output .navbox2 .hlist td dl,.mw-parser-output .navbox2 .hlist td ol,.mw-parser-output .navbox2 .hlist td ul,.mw-parser-output .navbox2 td.hlist dl,.mw-parser-output .navbox2 td.hlist ol,.mw-parser-output .navbox2 td.hlist ul{padding:0.125em 0}</style> <!-- NewPP limit report Parsed by mw‐api‐int.codfw.main‐658b54f75f‐8kn4s Cached time: 20241127223237 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.162 seconds Real time usage: 0.303 seconds Preprocessor visited node count: 695/1000000 Post‐expand include size: 15234/2097152 bytes Template argument size: 9188/2097152 bytes Highest expansion depth: 8/100 Expensive parser function count: 1/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 3913/5000000 bytes Lua time usage: 0.034/10.000 seconds Lua memory usage: 1320105/52428800 bytes Number of Wikibase entities loaded: 1/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 144.442 1 -total 46.83% 67.640 1 Šablona:Commonscat 24.03% 34.715 1 Šablona:Autoritní_data 13.95% 20.154 1 Šablona:Různé_významy 10.78% 15.564 1 Šablona:Končí_tečkou 10.37% 14.975 1 Šablona:Stromy_Inf 8.17% 11.804 1 Šablona:Navbox 1.44% 2.079 1 Šablona:Wayback 1.07% 1.552 1 Šablona:!SP --> <!-- Saved in parser cache with key cswiki:pcache:114729:|#|:idhash:canonical and timestamp 20241127223237 and revision id 24392820. Rendering was triggered because: api-parse --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Citováno z „<a dir="ltr" href="https://cs.wikipedia.org/w/index.php?title=Halda_(datová_struktura)&oldid=24392820">https://cs.wikipedia.org/w/index.php?title=Halda_(datová_struktura)&oldid=24392820</a>“</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/N%C3%A1pov%C4%9Bda:Kategorie" title="Nápověda:Kategorie">Kategorie</a>: <ul><li><a href="/wiki/Kategorie:Haldy" title="Kategorie:Haldy">Haldy</a></li><li><a href="/wiki/Kategorie:Stromy_(datov%C3%A9_struktury)" title="Kategorie:Stromy (datové struktury)">Stromy (datové struktury)</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Skrytá kategorie: <ul><li><a href="/wiki/Kategorie:Monitoring:Autoritn%C3%AD_kontrola_s_0_identifik%C3%A1tory" title="Kategorie:Monitoring:Autoritní kontrola s 0 identifikátory">Monitoring:Autoritní kontrola s 0 identifikátory</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> Stránka byla naposledy editována 15. 11. 2024 v 20:52.</li> <li id="footer-info-copyright">Text je dostupný pod <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.cs">licencí Creative Commons Uveďte původ – Zachovejte licenci</a>, případně za dalších podmínek. Podrobnosti naleznete na stránce <a class="external text" href="https://foundation.wikimedia.org/wiki/Policy:Terms_of_Use/cs">Podmínky užití</a>.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Ochrana osobních údajů</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedie">O Wikipedii</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedie:Vylou%C4%8Den%C3%AD_odpov%C4%9Bdnosti">Vyloučení odpovědnosti</a></li> <li id="footer-places-contact"><a href="//cs.wikipedia.org/wiki/Wikipedie:Kontakt">Kontaktujte Wikipedii</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Kodex chování</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Vývojáři</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/cs.wikipedia.org">Statistiky</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Prohlášení o cookies</a></li> <li id="footer-places-mobileview"><a href="//cs.m.wikipedia.org/w/index.php?title=Halda_(datov%C3%A1_struktura)&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobilní verze</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5c59558b9d-dtdxm","wgBackendResponseTime":163,"wgPageParseReport":{"limitreport":{"cputime":"0.162","walltime":"0.303","ppvisitednodes":{"value":695,"limit":1000000},"postexpandincludesize":{"value":15234,"limit":2097152},"templateargumentsize":{"value":9188,"limit":2097152},"expansiondepth":{"value":8,"limit":100},"expensivefunctioncount":{"value":1,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":3913,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 144.442 1 -total"," 46.83% 67.640 1 Šablona:Commonscat"," 24.03% 34.715 1 Šablona:Autoritní_data"," 13.95% 20.154 1 Šablona:Různé_významy"," 10.78% 15.564 1 Šablona:Končí_tečkou"," 10.37% 14.975 1 Šablona:Stromy_Inf"," 8.17% 11.804 1 Šablona:Navbox"," 1.44% 2.079 1 Šablona:Wayback"," 1.07% 1.552 1 Šablona:!SP"]},"scribunto":{"limitreport-timeusage":{"value":"0.034","limit":"10.000"},"limitreport-memusage":{"value":1320105,"limit":52428800}},"cachereport":{"origin":"mw-api-int.codfw.main-658b54f75f-8kn4s","timestamp":"20241127223237","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Halda (datov\u00e1 struktura)","url":"https:\/\/cs.wikipedia.org\/wiki\/Halda_(datov%C3%A1_struktura)","sameAs":"http:\/\/www.wikidata.org\/entity\/Q274089","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q274089","author":{"@type":"Organization","name":"P\u0159isp\u011bvatel\u00e9 projekt\u016f Wikimedia"},"publisher":{"@type":"Organization","name":"nadace Wikimedia","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2006-08-20T17:26:23Z","dateModified":"2024-11-15T19:52:03Z"}</script> </body> </html>