CINXE.COM
Binært søgetræ - Wikipedia, den frie encyklopædi
<!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="da" dir="ltr"> <head> <meta charset="UTF-8"> <title>Binært søgetræ - Wikipedia, den frie encyklopædi</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(/(?:^|; )dawikimwclientpreferences=([^;]+)/);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":"dmy","wgMonthNames":["","januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],"wgRequestId":"bf40a980-cd83-429c-a0cb-6964cb1f623f","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Binært_søgetræ","wgTitle":"Binært søgetræ","wgCurRevisionId":11853805,"wgRevisionId":11853805,"wgArticleId":57556,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Datastrukturer"],"wgPageViewLanguage":"da","wgPageContentLanguage":"da","wgPageContentModel":"wikitext","wgRelevantPageName":"Binært_søgetræ","wgRelevantArticleId":57556,"wgTempUserName":null,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0, "wgVisualEditor":{"pageLanguageCode":"da","pageLanguageDir":"ltr","pageVariantFallbacks":"da"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":4000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q623818","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false,"wgSiteNoticeId":"2.0"};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready" ,"user.options":"loading","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready","ext.dismissableSiteNotice.styles":"ready"};RLPAGEMODULES=["mediawiki.page.media","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.NewSection","ext.gadget.ReferenceTooltips","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","ext.dismissableSiteNotice"];</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=da&modules=ext.dismissableSiteNotice.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.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=da&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=da&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <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 property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Binary_tree.png/1200px-Binary_tree.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="697"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Binary_tree.png/800px-Binary_tree.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="465"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Binary_tree.png/640px-Binary_tree.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="372"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Binært søgetræ - Wikipedia, den frie encyklopædi"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//da.m.wikipedia.org/wiki/Bin%C3%A6rt_s%C3%B8getr%C3%A6"> <link rel="alternate" type="application/x-wiki" title="Redigér" href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&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="Wikipedia (da)"> <link rel="EditURI" type="application/rsd+xml" href="//da.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://da.wikipedia.org/wiki/Bin%C3%A6rt_s%C3%B8getr%C3%A6"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.da"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom-feed" href="/w/index.php?title=Speciel:Seneste_%C3%A6ndringer&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-Binært_søgetræ rootpage-Binært_søgetræ skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Spring til indhold</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="Websted"> <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="Hovedmenu" > <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">Hovedmenu</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">Hovedmenu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">flyt til sidebjælken</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">skjul</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage" class="mw-list-item"><a href="/wiki/Forside" title="Besøg forsiden [z]" accesskey="z"><span>Forside</span></a></li><li id="n-kategorier" class="mw-list-item"><a href="/wiki/Wikipedia:Kategorier"><span>Kategorier</span></a></li><li id="n-Fremhævet-indhold" class="mw-list-item"><a href="/wiki/Wikipedia:Fremh%C3%A6vet_indhold"><span>Fremhævet indhold</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Speciel:Tilf%C3%A6ldig_side" title="Gå til en tilfældig side [x]" accesskey="x"><span>Tilfældig side</span></a></li><li id="n-Tilfældige-artikler" class="mw-list-item"><a href="/wiki/Wikipedia:Tilf%C3%A6ldige_artikler"><span>Tilfældige artikler</span></a></li><li id="n-Aktuelt" class="mw-list-item"><a href="/wiki/Wikipedia:Aktuelle_begivenheder"><span>Aktuelt</span></a></li> </ul> </div> </div> <div id="p-deltagelse" class="vector-menu mw-portlet mw-portlet-deltagelse" > <div class="vector-menu-heading"> deltagelse </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-velkommen" class="mw-list-item"><a href="/wiki/Hj%C3%A6lp:Velkommen_til_Wikipedia"><span>Velkommen</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Forside" title="Om projektet, hvad du kan gøre, hvor tingene findes"><span>Skribentforside</span></a></li><li id="n-Landsbybrønden" class="mw-list-item"><a href="/wiki/Wikipedia:Landsbybr%C3%B8nden"><span>Landsbybrønden</span></a></li><li id="n-Projekter" class="mw-list-item"><a href="/wiki/Wikipedia:Projekter"><span>Projekter</span></a></li><li id="n-Portaler" class="mw-list-item"><a href="/wiki/Portal:Portaler"><span>Portaler</span></a></li><li id="n-Ønskede-artikler" class="mw-list-item"><a href="/wiki/Wikipedia:WikiProjekt_Efterspurgte_artikler"><span>Ønskede artikler</span></a></li><li id="n-Oprydning" class="mw-list-item"><a href="/wiki/Wikipedia:Oprydning"><span>Oprydning</span></a></li><li id="n-Kalender" class="mw-list-item"><a href="/wiki/Wikipedia:Kalender"><span>Kalender</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Speciel:Seneste_%C3%A6ndringer" title="Listen over de seneste ændringer i wikien. [r]" accesskey="r"><span>Seneste ændringer</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Hj%C3%A6lp:Forside" title="Stedet hvor du finder hjælp"><span>Hjælp</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Forside" 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="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="Den frie encyklopædi" src="/static/images/mobile/copyright/wikipedia-tagline-da.svg" width="120" height="13" style="width: 7.5em; 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/Speciel:S%C3%B8gning" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Søg på Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Søg</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="Søg på Wikipedia" aria-label="Søg på Wikipedia" autocapitalize="sentences" title="Søg på Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Speciel:Søgning"> </div> <button class="cdx-button cdx-search-input__end-button">Søg</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personlige værktøjer"> <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="Udseende"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Skift udseendet af sidens skriftstørrelse, -bredde og -farve" > <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="Udseende" > <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">Udseende</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_da.wikipedia.org&uselang=da" class=""><span>Donation</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=Speciel:Opret_konto&returnto=Bin%C3%A6rt+s%C3%B8getr%C3%A6" title="Du opfordres til at oprette en konto og logge på, men det er ikke obligatorisk" class=""><span>Opret konto</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=Speciel:Log_p%C3%A5&returnto=Bin%C3%A6rt+s%C3%B8getr%C3%A6" title="Du opfordres til at logge på, men det er ikke obligatorisk. [o]" accesskey="o" class=""><span>Log på</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 user-links-collapsible-item" title="Flere muligheder" > <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="Personlige værktøjer" > <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">Personlige værktøjer</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Brugermenu" > <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_da.wikipedia.org&uselang=da"><span>Donation</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Speciel:Opret_konto&returnto=Bin%C3%A6rt+s%C3%B8getr%C3%A6" title="Du opfordres til at oprette en konto og logge på, men det er ikke obligatorisk"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Opret konto</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Speciel:Log_p%C3%A5&returnto=Bin%C3%A6rt+s%C3%B8getr%C3%A6" title="Du opfordres til at logge på, men det er ikke obligatorisk. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log på</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"><div id="mw-dismissablenotice-anonplace"></div><script>(function(){var node=document.getElementById("mw-dismissablenotice-anonplace");if(node){node.outerHTML="\u003Cdiv class=\"mw-dismissable-notice\"\u003E\u003Cdiv class=\"mw-dismissable-notice-close\"\u003E[\u003Ca tabindex=\"0\" role=\"button\"\u003ELuk\u003C/a\u003E]\u003C/div\u003E\u003Cdiv class=\"mw-dismissable-notice-body\"\u003E\u003C!-- CentralNotice --\u003E\u003Cdiv id=\"localNotice\" data-nosnippet=\"\"\u003E\u003Cdiv class=\"sitenotice\" lang=\"da\" dir=\"ltr\"\u003E\u003Cp\u003EDu kan være med til at gøre Wikipedia bedre – \u003Ca href=\"/wiki/Hj%C3%A6lp:Du_kan_v%C3%A6re_med_til_at_g%C3%B8re_Wikipedia_bedre!\" title=\"Hjælp:Du kan være med til at gøre Wikipedia bedre!\"\u003Elæs her hvordan!\u003C/a\u003E\u003Cbr /\u003E \u003C/p\u003E\u003Cdiv class=\"vis-for-autopatrol\"\u003EDansk Wikipedia har en Discord-server, hvor du kan chatte. Se mere på \u003Ca href=\"/wiki/Wikipedia:Discord\" title=\"Wikipedia:Discord\"\u003EWikipedia:Discord\u003C/a\u003E\u003C/div\u003E\u003Cp\u003E\u003Ci\u003E\u003Csmall\u003E(\u003Ca href=\"/wiki/Hj%C3%A6lp:Sitenotice\" title=\"Hjælp:Sitenotice\"\u003ELæs her om sitenotice\u003C/a\u003E)\u003C/small\u003E\u003C/i\u003E\u003C/p\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E";}}());</script></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="Websted"> <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="Indhold" 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">Indhold</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">flyt til sidebjælken</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">skjul</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">Indledning</div> </a> </li> <li id="toc-Søgning" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Søgning"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Søgning</span> </div> </a> <ul id="toc-Søgning-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Sekventiel_gennemgang" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Sekventiel_gennemgang"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Sekventiel gennemgang</span> </div> </a> <ul id="toc-Sekventiel_gennemgang-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Indsættelse_af_data" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Indsættelse_af_data"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Indsættelse af data</span> </div> </a> <ul id="toc-Indsættelse_af_data-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Sletning_af_data" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Sletning_af_data"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Sletning af data</span> </div> </a> <button aria-controls="toc-Sletning_af_data-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>Vis/skjul underafsnit Sletning af data</span> </button> <ul id="toc-Sletning_af_data-sublist" class="vector-toc-list"> <li id="toc-Sletning_af_enkelte_elementer" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Sletning_af_enkelte_elementer"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Sletning af enkelte elementer</span> </div> </a> <ul id="toc-Sletning_af_enkelte_elementer-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Kilder" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Kilder"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Kilder</span> </div> </a> <ul id="toc-Kilder-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="Indhold" 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="Vis/skjul indholdsfortegnelsen" > <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">Vis/skjul indholdsfortegnelsen</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">Binært søgetræ</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="Gå til en artikel på et andet sprog. Tilgængelig på 34 sprog" > <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-34" 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">34 sprog</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/%D8%B4%D8%AC%D8%B1%D8%A9_%D8%A8%D8%AD%D8%AB_%D8%AB%D9%86%D8%A7%D8%A6%D9%8A%D8%A9" title="شجرة بحث ثنائية – arabisk" lang="ar" hreflang="ar" data-title="شجرة بحث ثنائية" data-language-autonym="العربية" data-language-local-name="arabisk" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/%D0%94%D0%B2%D0%BE%D0%B8%D1%87%D0%BD%D0%BE_%D0%B4%D1%8A%D1%80%D0%B2%D0%BE_%D0%B7%D0%B0_%D1%82%D1%8A%D1%80%D1%81%D0%B5%D0%BD%D0%B5" title="Двоично дърво за търсене – bulgarsk" lang="bg" hreflang="bg" data-title="Двоично дърво за търсене" data-language-autonym="Български" data-language-local-name="bulgarsk" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikipedia.org/wiki/Binarno_stablo_pretra%C5%BEivanja" title="Binarno stablo pretraživanja – bosnisk" lang="bs" hreflang="bs" data-title="Binarno stablo pretraživanja" data-language-autonym="Bosanski" data-language-local-name="bosnisk" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Arbre_binari_de_cerca" title="Arbre binari de cerca – catalansk" lang="ca" hreflang="ca" data-title="Arbre binari de cerca" data-language-autonym="Català" data-language-local-name="catalansk" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Bin%C3%A1rn%C3%AD_vyhled%C3%A1vac%C3%AD_strom" title="Binární vyhledávací strom – tjekkisk" lang="cs" hreflang="cs" data-title="Binární vyhledávací strom" data-language-autonym="Čeština" data-language-local-name="tjekkisk" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Bin%C3%A4rer_Suchbaum" title="Binärer Suchbaum – tysk" lang="de" hreflang="de" data-title="Binärer Suchbaum" data-language-autonym="Deutsch" data-language-local-name="tysk" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-en badge-Q17437798 badge-goodarticle mw-list-item" title="god artikel"><a href="https://en.wikipedia.org/wiki/Binary_search_tree" title="Binary search tree – engelsk" lang="en" hreflang="en" data-title="Binary search tree" data-language-autonym="English" data-language-local-name="engelsk" 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/%C3%81rbol_binario_de_b%C3%BAsqueda" title="Árbol binario de búsqueda – spansk" lang="es" hreflang="es" data-title="Árbol binario de búsqueda" data-language-autonym="Español" data-language-local-name="spansk" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%AF%D8%B1%D8%AE%D8%AA_%D8%AC%D8%B3%D8%AA%D8%AC%D9%88%DB%8C_%D8%AF%D9%88%D8%AF%D9%88%DB%8C%DB%8C" title="درخت جستجوی دودویی – persisk" lang="fa" hreflang="fa" data-title="درخت جستجوی دودویی" data-language-autonym="فارسی" data-language-local-name="persisk" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Bin%C3%A4%C3%A4rinen_hakupuu" title="Binäärinen hakupuu – finsk" lang="fi" hreflang="fi" data-title="Binäärinen hakupuu" data-language-autonym="Suomi" data-language-local-name="finsk" 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/Arbre_binaire_de_recherche" title="Arbre binaire de recherche – fransk" lang="fr" hreflang="fr" data-title="Arbre binaire de recherche" data-language-autonym="Français" data-language-local-name="fransk" 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%A5_%D7%97%D7%99%D7%A4%D7%95%D7%A9" title="עץ חיפוש – hebraisk" lang="he" hreflang="he" data-title="עץ חיפוש" data-language-autonym="עברית" data-language-local-name="hebraisk" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/%D4%B2%D5%AB%D5%B6%D5%A1%D6%80_%D5%B8%D6%80%D5%B8%D5%B6%D5%B4%D5%A1%D5%B6_%D5%AE%D5%A1%D5%BC" title="Բինար որոնման ծառ – armensk" lang="hy" hreflang="hy" data-title="Բինար որոնման ծառ" data-language-autonym="Հայերեն" data-language-local-name="armensk" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Pohon_Pencarian_Biner" title="Pohon Pencarian Biner – indonesisk" lang="id" hreflang="id" data-title="Pohon Pencarian Biner" data-language-autonym="Bahasa Indonesia" data-language-local-name="indonesisk" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Albero_binario_di_ricerca" title="Albero binario di ricerca – italiensk" lang="it" hreflang="it" data-title="Albero binario di ricerca" data-language-autonym="Italiano" data-language-local-name="italiensk" 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/%E4%BA%8C%E5%88%86%E6%8E%A2%E7%B4%A2%E6%9C%A8" title="二分探索木 – japansk" lang="ja" hreflang="ja" data-title="二分探索木" data-language-autonym="日本語" data-language-local-name="japansk" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-kn mw-list-item"><a href="https://kn.wikipedia.org/wiki/%E0%B2%AC%E0%B3%88%E0%B2%A8%E0%B2%B0%E0%B2%BF_%E0%B2%B8%E0%B2%B0%E0%B3%8D%E0%B2%9A%E0%B3%8D_%E0%B2%9F%E0%B3%8D%E0%B2%B0%E0%B3%80_(%E0%B2%AC%E0%B3%88%E0%B2%A8%E0%B2%B0%E0%B2%BF_%E0%B2%B9%E0%B3%81%E0%B2%A1%E0%B3%81%E0%B2%95%E0%B2%BE%E0%B2%9F%E0%B2%A6_%E0%B2%9F%E0%B3%8D%E0%B2%B0%E0%B3%80)" title="ಬೈನರಿ ಸರ್ಚ್ ಟ್ರೀ (ಬೈನರಿ ಹುಡುಕಾಟದ ಟ್ರೀ) – kannada" lang="kn" hreflang="kn" data-title="ಬೈನರಿ ಸರ್ಚ್ ಟ್ರೀ (ಬೈನರಿ ಹುಡುಕಾಟದ ಟ್ರೀ)" data-language-autonym="ಕನ್ನಡ" data-language-local-name="kannada" class="interlanguage-link-target"><span>ಕನ್ನಡ</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%9D%B4%EC%A7%84_%ED%83%90%EC%83%89_%ED%8A%B8%EB%A6%AC" title="이진 탐색 트리 – koreansk" lang="ko" hreflang="ko" data-title="이진 탐색 트리" data-language-autonym="한국어" data-language-local-name="koreansk" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-lmo mw-list-item"><a href="https://lmo.wikipedia.org/wiki/Alber_binari_de_ricerca" title="Alber binari de ricerca – Lombard" lang="lmo" hreflang="lmo" data-title="Alber binari de ricerca" data-language-autonym="Lombard" data-language-local-name="Lombard" class="interlanguage-link-target"><span>Lombard</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Binaire_zoekboom" title="Binaire zoekboom – nederlandsk" lang="nl" hreflang="nl" data-title="Binaire zoekboom" data-language-autonym="Nederlands" data-language-local-name="nederlandsk" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Binarne_drzewo_poszukiwa%C5%84" title="Binarne drzewo poszukiwań – polsk" lang="pl" hreflang="pl" data-title="Binarne drzewo poszukiwań" data-language-autonym="Polski" data-language-local-name="polsk" 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/%C3%81rvore_bin%C3%A1ria_de_busca" title="Árvore binária de busca – portugisisk" lang="pt" hreflang="pt" data-title="Árvore binária de busca" data-language-autonym="Português" data-language-local-name="portugisisk" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Arbore_binar_de_c%C4%83utare" title="Arbore binar de căutare – rumænsk" lang="ro" hreflang="ro" data-title="Arbore binar de căutare" data-language-autonym="Română" data-language-local-name="rumænsk" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%94%D0%B2%D0%BE%D0%B8%D1%87%D0%BD%D0%BE%D0%B5_%D0%B4%D0%B5%D1%80%D0%B5%D0%B2%D0%BE_%D0%BF%D0%BE%D0%B8%D1%81%D0%BA%D0%B0" title="Двоичное дерево поиска – russisk" lang="ru" hreflang="ru" data-title="Двоичное дерево поиска" data-language-autonym="Русский" data-language-local-name="russisk" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sh mw-list-item"><a href="https://sh.wikipedia.org/wiki/Binarno_stablo_pretrage" title="Binarno stablo pretrage – serbokroatisk" lang="sh" hreflang="sh" data-title="Binarno stablo pretrage" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="serbokroatisk" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/Bin%C3%A1rny_vyh%C4%BEad%C3%A1vac%C3%AD_strom" title="Binárny vyhľadávací strom – slovakisk" lang="sk" hreflang="sk" data-title="Binárny vyhľadávací strom" data-language-autonym="Slovenčina" data-language-local-name="slovakisk" 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/Binarno_stablo_pretrage" title="Binarno stablo pretrage – serbisk" lang="sr" hreflang="sr" data-title="Binarno stablo pretrage" data-language-autonym="Српски / srpski" data-language-local-name="serbisk" 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/Bin%C3%A4rt_s%C3%B6ktr%C3%A4d" title="Binärt sökträd – svensk" lang="sv" hreflang="sv" data-title="Binärt sökträd" data-language-autonym="Svenska" data-language-local-name="svensk" 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%95%E0%B9%89%E0%B8%99%E0%B9%84%E0%B8%A1%E0%B9%89%E0%B8%84%E0%B9%89%E0%B8%99%E0%B8%AB%E0%B8%B2%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B8%97%E0%B8%A7%E0%B8%B4%E0%B8%A0%E0%B8%B2%E0%B8%84" title="ต้นไม้ค้นหาแบบทวิภาค – thai" lang="th" hreflang="th" data-title="ต้นไม้ค้นหาแบบทวิภาค" data-language-autonym="ไทย" data-language-local-name="thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/%C4%B0kili_arama_a%C4%9Fac%C4%B1" title="İkili arama ağacı – tyrkisk" lang="tr" hreflang="tr" data-title="İkili arama ağacı" data-language-autonym="Türkçe" data-language-local-name="tyrkisk" 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%94%D0%B2%D1%96%D0%B9%D0%BA%D0%BE%D0%B2%D0%B5_%D0%B4%D0%B5%D1%80%D0%B5%D0%B2%D0%BE_%D0%BF%D0%BE%D1%88%D1%83%D0%BA%D1%83" title="Двійкове дерево пошуку – ukrainsk" lang="uk" hreflang="uk" data-title="Двійкове дерево пошуку" data-language-autonym="Українська" data-language-local-name="ukrainsk" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/C%C3%A2y_t%C3%ACm_ki%E1%BA%BFm_nh%E1%BB%8B_ph%C3%A2n" title="Cây tìm kiếm nhị phân – vietnamesisk" lang="vi" hreflang="vi" data-title="Cây tìm kiếm nhị phân" data-language-autonym="Tiếng Việt" data-language-local-name="vietnamesisk" 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/%E4%BA%8C%E5%85%83%E6%90%9C%E5%B0%8B%E6%A8%B9" title="二元搜尋樹 – kinesisk" lang="zh" hreflang="zh" data-title="二元搜尋樹" data-language-autonym="中文" data-language-local-name="kinesisk" 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/%E4%BA%8C%E5%85%83%E6%90%9C%E5%B0%8B%E6%A8%B9" title="二元搜尋樹 – kantonesisk" lang="yue" hreflang="yue" data-title="二元搜尋樹" data-language-autonym="粵語" data-language-local-name="kantonesisk" 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/Q623818#sitelinks-wikipedia" title="Redigér sproglinks" class="wbc-editpage">Redigér links</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="Navnerum"> <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/Bin%C3%A6rt_s%C3%B8getr%C3%A6" title="Se indholdssiden [c]" accesskey="c"><span>Artikel</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Diskussion:Bin%C3%A6rt_s%C3%B8getr%C3%A6" rel="discussion" title="Diskussion om indholdet på siden [t]" accesskey="t"><span>Diskussion</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="Ændr sprogvariant" > <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">dansk</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="Visninger"> <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/Bin%C3%A6rt_s%C3%B8getr%C3%A6"><span>Læs</span></a></li><li id="ca-ve-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&veaction=edit" title="Redigér denne side [v]" accesskey="v"><span>Redigér</span></a></li><li id="ca-edit" class="collapsible vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=edit" title="Rediger kildekoden for denne side [e]" accesskey="e"><span>Rediger kildekode</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=history" title="Tidligere versioner af denne side [h]" accesskey="h"><span>Se historik</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Sideværktøjer"> <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="Værktøjer" > <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">Værktøjer</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">Værktøjer</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">flyt til sidebjælken</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">skjul</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Flere muligheder" > <div class="vector-menu-heading"> Handlinger </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/Bin%C3%A6rt_s%C3%B8getr%C3%A6"><span>Læs</span></a></li><li id="ca-more-ve-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&veaction=edit" title="Redigér denne side [v]" accesskey="v"><span>Redigér</span></a></li><li id="ca-more-edit" class="collapsible vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=edit" title="Rediger kildekoden for denne side [e]" accesskey="e"><span>Rediger kildekode</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=history"><span>Se historik</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> Generelt </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Speciel:Hvad_linker_hertil/Bin%C3%A6rt_s%C3%B8getr%C3%A6" title="Liste med alle sider som henviser hertil [j]" accesskey="j"><span>Hvad henviser hertil</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Speciel:Relaterede_%C3%A6ndringer/Bin%C3%A6rt_s%C3%B8getr%C3%A6" rel="nofollow" title="Seneste ændringer af sider som denne side henviser til [k]" accesskey="k"><span>Beslægtede ændringer</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=da&campaign=dk" title="Upload filer [u]" accesskey="u"><span>Upload fil</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Speciel:Specialsider" title="Liste over alle specialsider [q]" accesskey="q"><span>Specialsider</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&oldid=11853805" title="Permanent link til denne version af denne side"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=info" title="Yderligere oplysninger om denne side"><span>Sideinformation</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Speciel:Citer&page=Bin%C3%A6rt_s%C3%B8getr%C3%A6&id=11853805&wpFormIdentifier=titleform" title="Information om, hvordan man kan citere denne side"><span>Referer til denne side</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Speciel:UrlShortener&url=https%3A%2F%2Fda.wikipedia.org%2Fwiki%2FBin%25C3%25A6rt_s%25C3%25B8getr%25C3%25A6"><span>Hent forkortet URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Speciel:QrCode&url=https%3A%2F%2Fda.wikipedia.org%2Fwiki%2FBin%25C3%25A6rt_s%25C3%25B8getr%25C3%25A6"><span>Download QR-kode</span></a></li> </ul> </div> </div> <div id="p-Organisation" class="vector-menu mw-portlet mw-portlet-Organisation" > <div class="vector-menu-heading"> Organisation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-contact" class="mw-list-item"><a href="/wiki/Wikipedia:Kontakt_Wikipedia"><span>Kontakt Wikipedia</span></a></li><li id="n-Wikimedia-Danmark" class="mw-list-item"><a href="https://dk.wikimedia.org/wiki/"><span>Wikimedia Danmark</span></a></li><li id="n-GLAM" class="mw-list-item"><a href="/wiki/Wikipedia:GLAM"><span>GLAM</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"> Udskriv/eksportér </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=Speciel:Bog&bookcmd=book_creator&referer=Bin%C3%A6rt+s%C3%B8getr%C3%A6"><span>Lav en bog</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Speciel:DownloadAsPdf&page=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=show-download-screen"><span>Download som PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&printable=yes" title="Printervenlig udgave af denne side [p]" accesskey="p"><span>Udskriftsvenlig udgave</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"> I andre projekter </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:Binary_search_trees" 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/Q623818" title="Link til tilknyttet emne i Wikidata [g]" accesskey="g"><span>Wikidata-element</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="Sideværktøjer"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Udseende"> <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">Udseende</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">flyt til sidebjælken</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">skjul</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">Fra Wikipedia, den frie encyklopædi</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="da" dir="ltr"><figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/Fil:Binary_tree.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Binary_tree.png/220px-Binary_tree.png" decoding="async" width="220" height="128" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Binary_tree.png/330px-Binary_tree.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/df/Binary_tree.png/440px-Binary_tree.png 2x" data-file-width="1305" data-file-height="758" /></a><figcaption>Binært træ med 4 niveauer</figcaption></figure> <p>Et <b>binært søgetræ</b> er en forholdsvis enkel <a href="/wiki/Tr%C3%A6_(datastruktur)" title="Træ (datastruktur)">træstruktur</a> til opbevaring af data. Dette er den største fordel. Ulemperne er, at træets effektivitet er afhængig af indsættelsesrækkefølgen, og hver knude kun refererer til to knuder på næste niveau, hvilket giver et ret højt træ. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Søgning"><span id="S.C3.B8gning"></span>Søgning</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&veaction=edit&section=1" title="Redigér afsnit: Søgning" class="mw-editsection-visualeditor"><span>redigér</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=edit&section=1" title="Edit section's source code: Søgning"><span>rediger kildetekst</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I et binært søgetræ laves søgningen nemmest som en <a href="/w/index.php?title=Rekursiv_funktion&action=edit&redlink=1" class="new" title="Rekursiv funktion (ikke skrevet endnu)">rekursiv funktion</a>. Start ved roden og brug denne <a href="/wiki/Algoritme" title="Algoritme">algoritme</a>: </p> <ol><li>Hvis søgetræet er tomt, blev data ikke fundet</li> <li>Hvis nøglen i den aktuelle knude er lig med <a href="/wiki/S%C3%B8gen%C3%B8gle" class="mw-redirect" title="Søgenøgle">søgenøglen</a> er data fundet</li> <li>Hvis nøglen er mindre end nøglen i den aktuelle knude, så gentag søgningen i det venstre undertræ</li> <li>Hvis nøglen er større end nøglen i den aktuelle knude, så gentag søgningen i det højre undertræ</li></ol> <div class="mw-heading mw-heading2"><h2 id="Sekventiel_gennemgang">Sekventiel gennemgang</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&veaction=edit&section=2" title="Redigér afsnit: Sekventiel gennemgang" class="mw-editsection-visualeditor"><span>redigér</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=edit&section=2" title="Edit section's source code: Sekventiel gennemgang"><span>rediger kildetekst</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Hvis alle knuder i et søgetræ skal behandles, kan det ske i tre rækkefølger: </p> <ul><li>Pre-orden – Først behandles den aktuelle knude, så det venstre undertræ og til sidst det højre</li> <li>In-orden – Først behandles venstre undertræ, så den aktuelle knude og til sidst højre undertræ</li> <li>Post-orden – Først behandles venstre og højre undertræ og til sidst den aktuelle knude</li></ul> <p>Gennemgang af træet i in-orden giver data i sorteret rækkefølge. Hvis data skrives til en <a href="/wiki/Fil_(dataobjekt)" title="Fil (dataobjekt)">fil</a> i post-orden, vil søgetræet kunne genskabes ved at indsætte data i samme rækkefølge, som de ligger i filen. Gennemgang i pre-orden er praktisk, hvis hele søgetræet skal slettes. </p> <div class="mw-heading mw-heading2"><h2 id="Indsættelse_af_data"><span id="Inds.C3.A6ttelse_af_data"></span>Indsættelse af data</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&veaction=edit&section=3" title="Redigér afsnit: Indsættelse af data" class="mw-editsection-visualeditor"><span>redigér</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=edit&section=3" title="Edit section's source code: Indsættelse af data"><span>rediger kildetekst</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Når data skal indsættes bruges en variant af søgerutinen. Forskellen består i, at der hele tiden vedligeholdes en reference til den foregående knude. Efter endt søgning kan der opstå to situationer. </p> <ul><li>Hvis der ikke er data, med samme nøgle som det nye dataelement, er den foregående knude det sted, hvor der skal tilføjes nye data. Den nye knude placeres til højre eller venstre alt efter om nøglen er større eller mindre end nøglen i den foregående knude.</li></ul> <ul><li>Hvis der er data med samme nøgle som i det nye element, er der tale om en dublet. Hvis der tillades dubletter, kan de nye data indsættes enten til højre eller venstre. Det skal blot være konsekvent.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Sletning_af_data">Sletning af data</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&veaction=edit&section=4" title="Redigér afsnit: Sletning af data" class="mw-editsection-visualeditor"><span>redigér</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=edit&section=4" title="Edit section's source code: Sletning af data"><span>rediger kildetekst</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Hvis hele det binære træ skal fjernes, er fremgangsmåden ret enkel. Man kan bruge en <a href="/wiki/Rekursion" title="Rekursion">rekursiv</a> algoritme: </p> <ol><li>Hvis søgetræet er tomt, så stop</li> <li>Slet alle elementer i det ene undertræ</li> <li>slet alle elementer i det andet</li> <li>Slet den aktuelle knude</li></ol> <p>Algoritmen forudsætter, at referencer, der ikke længere peger på en knude, kan genkendes. </p> <div class="mw-heading mw-heading3"><h3 id="Sletning_af_enkelte_elementer">Sletning af enkelte elementer</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&veaction=edit&section=5" title="Redigér afsnit: Sletning af enkelte elementer" class="mw-editsection-visualeditor"><span>redigér</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=edit&section=5" title="Edit section's source code: Sletning af enkelte elementer"><span>rediger kildetekst</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Sletning af en enkelt knude kan være besværlig. Der er tre situationer, at tage hensyn til: </p> <ul><li>Knuden er en bladknude. I dette tilfæde fjernes referencen til knuden og knuden slettes.</li> <li>Knuden refererer til en anden knude. Da der kun refereres til en anden knude, kan knuden slettes som om den var en del af en <a href="/wiki/Liste_(datastruktur)" title="Liste (datastruktur)">kædet liste</a>.</li> <li>Knuden refererer til to andre knuder. Dette er det besværlige tilfælde. For at undgå at tabe et par undertræer bliver selve knuden ikke slettet. I stedet findes knuden med den største nøgle i det venstre (nøglemæssigt mindste) undertræ. Denne knudes indhold kopieres over i den knude, der skulle slettes. Den knude, der blev kopieret fra er en bladknude, så den fjernes let.</li></ul> <table border="0" cellpadding="2" align="right"> <caption><a href="/wiki/Tidskompleksitet" title="Tidskompleksitet">Tidskompleksitet</a> </caption> <tbody><tr> <th bgcolor="#AAAAFF">Operation </th> <th bgcolor="#AAAAFF">Relativ tid </th></tr> <tr> <td>Find</td> <td>O(log<sub>2</sub> N) </td></tr> <tr> <td>Indsæt</td> <td>O(log<sub>2</sub> N) </td></tr> <tr> <td>Slet</td> <td>O(log<sub>2</sub> N) </td></tr></tbody></table> <div class="mw-heading mw-heading2"><h2 id="Kilder">Kilder</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&veaction=edit&section=6" title="Redigér afsnit: Kilder" class="mw-editsection-visualeditor"><span>redigér</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&action=edit&section=6" title="Edit section's source code: Kilder"><span>rediger kildetekst</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>File organization and Processing af Allan L. Tharp <a href="/wiki/Internationalt_Standardbognummer" title="Internationalt Standardbognummer">ISBN</a> <a href="/wiki/Speciel:ISBN-s%C3%B8gning/0-471-61766-0" title="Speciel:ISBN-søgning/0-471-61766-0">0-471-61766-0</a></li> <li>Pascal Plus Datastructures, Algorithms and Advanced Programming af Nell Dale og Susan C. Lilly <a href="/wiki/Internationalt_Standardbognummer" title="Internationalt Standardbognummer">ISBN</a> <a href="/wiki/Speciel:ISBN-s%C3%B8gning/0-669-24830-4" title="Speciel:ISBN-søgning/0-669-24830-4">0-669-24830-4</a></li></ul> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐7587f976f‐tfqvz Cached time: 20241107174231 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.056 seconds Real time usage: 0.357 seconds Preprocessor visited node count: 743/1000000 Post‐expand include size: 3442/2097152 bytes Template argument size: 1363/2097152 bytes Highest expansion depth: 16/100 Expensive parser function count: 0/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 0/5000000 bytes Lua time usage: 0.004/10.000 seconds Lua memory usage: 721646/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 52.193 1 -total 93.46% 48.780 2 Skabelon:ISBN 23.69% 12.363 2 Skabelon:Catalog_lookup_link 20.16% 10.520 2 Skabelon:Error-small 16.86% 8.800 2 Skabelon:Small 8.56% 4.469 6 Skabelon:Yesno-no 7.92% 4.133 4 Skabelon:Main_other 6.60% 3.446 2 Skabelon:Vis 6.22% 3.245 1 Skabelon:Datastruktur 5.22% 2.726 8 Skabelon:Yesno --> <!-- Saved in parser cache with key dawiki:pcache:idhash:57556-0!canonical and timestamp 20241107174231 and revision id 11853805. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Hentet fra "<a dir="ltr" href="https://da.wikipedia.org/w/index.php?title=Binært_søgetræ&oldid=11853805">https://da.wikipedia.org/w/index.php?title=Binært_søgetræ&oldid=11853805</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Speciel:Kategorier" title="Speciel:Kategorier">Kategori</a>: <ul><li><a href="/wiki/Kategori:Datastrukturer" title="Kategori:Datastrukturer">Datastrukturer</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"> Denne side blev senest ændret den 6. september 2024 kl. 14:45.</li> <li id="footer-info-copyright">Tekst er tilgængelig under <a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/deed.da">Creative Commons Navngivelse/Del på samme vilkår 4.0</a>; yderligere betingelser kan være gældende. Se <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use/da">brugsbetingelserne</a> for flere oplysninger.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privatlivspolitik</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:Om">Om Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:Generelle_forbehold">Forbehold</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Udviklere</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/da.wikipedia.org">Statistik</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie-erklæring</a></li> <li id="footer-places-mobileview"><a href="//da.m.wikipedia.org/w/index.php?title=Bin%C3%A6rt_s%C3%B8getr%C3%A6&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobilvisning</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-f69cdc8f6-5pr2z","wgBackendResponseTime":154,"wgPageParseReport":{"limitreport":{"cputime":"0.056","walltime":"0.357","ppvisitednodes":{"value":743,"limit":1000000},"postexpandincludesize":{"value":3442,"limit":2097152},"templateargumentsize":{"value":1363,"limit":2097152},"expansiondepth":{"value":16,"limit":100},"expensivefunctioncount":{"value":0,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":0,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 52.193 1 -total"," 93.46% 48.780 2 Skabelon:ISBN"," 23.69% 12.363 2 Skabelon:Catalog_lookup_link"," 20.16% 10.520 2 Skabelon:Error-small"," 16.86% 8.800 2 Skabelon:Small"," 8.56% 4.469 6 Skabelon:Yesno-no"," 7.92% 4.133 4 Skabelon:Main_other"," 6.60% 3.446 2 Skabelon:Vis"," 6.22% 3.245 1 Skabelon:Datastruktur"," 5.22% 2.726 8 Skabelon:Yesno"]},"scribunto":{"limitreport-timeusage":{"value":"0.004","limit":"10.000"},"limitreport-memusage":{"value":721646,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-7587f976f-tfqvz","timestamp":"20241107174231","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Bin\u00e6rt s\u00f8getr\u00e6","url":"https:\/\/da.wikipedia.org\/wiki\/Bin%C3%A6rt_s%C3%B8getr%C3%A6","sameAs":"http:\/\/www.wikidata.org\/entity\/Q623818","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q623818","author":{"@type":"Organization","name":"Bidragsydere til Wikimedia-projekter"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2005-05-22T06:30:22Z","dateModified":"2024-09-06T13:45:46Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/d\/df\/Binary_tree.png"}</script> </body> </html>