CINXE.COM
Træ (datastruktur) - 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>Træ (datastruktur) - 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":"19ac3c21-0d7b-4970-913c-296920143a80","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Træ_(datastruktur)","wgTitle":"Træ (datastruktur)","wgCurRevisionId":9712614,"wgRevisionId":9712614,"wgArticleId":57513,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Påbegyndte datalogi-artikler","Påbegyndte artikler (samlet liste)","Datastrukturer","Grafteori"],"wgPageViewLanguage":"da","wgPageContentLanguage":"da","wgPageContentModel":"wikitext","wgRelevantPageName":"Træ_(datastruktur)","wgRelevantArticleId":57513,"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":2000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q223655","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","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/3/33/Balanced_tree.png/1200px-Balanced_tree.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="830"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Balanced_tree.png/800px-Balanced_tree.png"> <meta property="og:image:width" content="800"> <meta property="og:image:height" content="553"> <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Balanced_tree.png/640px-Balanced_tree.png"> <meta property="og:image:width" content="640"> <meta property="og:image:height" content="442"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Træ (datastruktur) - 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/Tr%C3%A6_(datastruktur)"> <link rel="alternate" type="application/x-wiki" title="Redigér" href="/w/index.php?title=Tr%C3%A6_(datastruktur)&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/Tr%C3%A6_(datastruktur)"> <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-Træ_datastruktur rootpage-Træ_datastruktur 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=Tr%C3%A6+%28datastruktur%29" 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=Tr%C3%A6+%28datastruktur%29" 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=Tr%C3%A6+%28datastruktur%29" 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=Tr%C3%A6+%28datastruktur%29" 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-Terminologi" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Terminologi"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Terminologi</span> </div> </a> <ul id="toc-Terminologi-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Gængse_træstrukturer" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Gængse_træstrukturer"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Gængse træstrukturer</span> </div> </a> <ul id="toc-Gængse_træstrukturer-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">Træ (datastruktur)</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å 43 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-43" 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">43 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_(%D9%87%D9%8A%D8%A7%D9%83%D9%84_%D8%A8%D9%8A%D8%A7%D9%86%D8%A7%D8%AA)" 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%D1%8A%D1%80%D0%B2%D0%BE_(%D1%81%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%B0_%D0%BE%D1%82_%D0%B4%D0%B0%D0%BD%D0%BD%D0%B8)" 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-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Arbre_(estructura_de_dades)" title="Arbre (estructura de dades) – catalansk" lang="ca" hreflang="ca" data-title="Arbre (estructura de dades)" 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/Strom_(datov%C3%A1_struktura)" title="Strom (datová struktura) – tjekkisk" lang="cs" hreflang="cs" data-title="Strom (datová struktura)" 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-cv mw-list-item"><a href="https://cv.wikipedia.org/wiki/%D0%99%D1%8B%D0%B2%C4%83%C3%A7_(%D0%BF%D0%B0%D0%BD%C4%83%D0%BB%C4%83%D1%85%D1%81%D0%B5%D0%BD_%D1%82%D1%8B%D1%82%C4%83%D0%BC%C4%95)" title="Йывăç (панăлăхсен тытăмĕ) – tjuvasjisk" lang="cv" hreflang="cv" data-title="Йывăç (панăлăхсен тытăмĕ)" data-language-autonym="Чӑвашла" data-language-local-name="tjuvasjisk" class="interlanguage-link-target"><span>Чӑвашла</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Baum_(Datenstruktur)" title="Baum (Datenstruktur) – tysk" lang="de" hreflang="de" data-title="Baum (Datenstruktur)" data-language-autonym="Deutsch" data-language-local-name="tysk" 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/Tree_(abstract_data_type)" title="Tree (abstract data type) – engelsk" lang="en" hreflang="en" data-title="Tree (abstract data type)" data-language-autonym="English" data-language-local-name="engelsk" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/Arbo_(datumstrukturo)" title="Arbo (datumstrukturo) – esperanto" lang="eo" hreflang="eo" data-title="Arbo (datumstrukturo)" data-language-autonym="Esperanto" data-language-local-name="esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/%C3%81rbol_(inform%C3%A1tica)" title="Árbol (informática) – spansk" lang="es" hreflang="es" data-title="Árbol (informática)" 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-et mw-list-item"><a href="https://et.wikipedia.org/wiki/Puu_(andmestruktuur)" title="Puu (andmestruktuur) – estisk" lang="et" hreflang="et" data-title="Puu (andmestruktuur)" data-language-autonym="Eesti" data-language-local-name="estisk" 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/%D8%AF%D8%B1%D8%AE%D8%AA_(%D8%B3%D8%A7%D8%AE%D8%AA%D8%A7%D8%B1_%D8%AF%D8%A7%D8%AF%D9%87)" 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/Puu_(tietorakenne)" title="Puu (tietorakenne) – finsk" lang="fi" hreflang="fi" data-title="Puu (tietorakenne)" 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_enracin%C3%A9" title="Arbre enraciné – fransk" lang="fr" hreflang="fr" data-title="Arbre enraciné" 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-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Fa_(adatszerkezet)" title="Fa (adatszerkezet) – ungarsk" lang="hu" hreflang="hu" data-title="Fa (adatszerkezet)" data-language-autonym="Magyar" data-language-local-name="ungarsk" 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/Pohon_(struktur_data)" title="Pohon (struktur data) – indonesisk" lang="id" hreflang="id" data-title="Pohon (struktur data)" 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-io mw-list-item"><a href="https://io.wikipedia.org/wiki/Arboro_(informatiko)" title="Arboro (informatiko) – ido" lang="io" hreflang="io" data-title="Arboro (informatiko)" data-language-autonym="Ido" data-language-local-name="ido" class="interlanguage-link-target"><span>Ido</span></a></li><li class="interlanguage-link interwiki-is mw-list-item"><a href="https://is.wikipedia.org/wiki/Tr%C3%A9_(t%C3%B6lvunarfr%C3%A6%C3%B0i)" title="Tré (tölvunarfræði) – islandsk" lang="is" hreflang="is" data-title="Tré (tölvunarfræði)" data-language-autonym="Íslenska" data-language-local-name="islandsk" 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/Albero_(informatica)" title="Albero (informatica) – italiensk" lang="it" hreflang="it" data-title="Albero (informatica)" 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/%E6%9C%A8%E6%A7%8B%E9%80%A0_(%E3%83%87%E3%83%BC%E3%82%BF%E6%A7%8B%E9%80%A0)" 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-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%ED%8A%B8%EB%A6%AC_%EA%B5%AC%EC%A1%B0" 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-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/Medis_(duomen%C5%B3_strukt%C5%ABra)" title="Medis (duomenų struktūra) – litauisk" lang="lt" hreflang="lt" data-title="Medis (duomenų struktūra)" data-language-autonym="Lietuvių" data-language-local-name="litauisk" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://lv.wikipedia.org/wiki/Koks_(datu_strukt%C5%ABra)" title="Koks (datu struktūra) – lettisk" lang="lv" hreflang="lv" data-title="Koks (datu struktūra)" data-language-autonym="Latviešu" data-language-local-name="lettisk" class="interlanguage-link-target"><span>Latviešu</span></a></li><li class="interlanguage-link interwiki-mk mw-list-item"><a href="https://mk.wikipedia.org/wiki/%D0%94%D1%80%D0%B2%D0%BE_(%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%BE%D1%87%D0%BD%D0%B0_%D1%81%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%B0)" title="Дрво (податочна структура) – makedonsk" lang="mk" hreflang="mk" data-title="Дрво (податочна структура)" data-language-autonym="Македонски" data-language-local-name="makedonsk" class="interlanguage-link-target"><span>Македонски</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%9F%E0%B5%8D%E0%B4%B0%E0%B5%80_(%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%E0%B4%9A%E0%B5%BC)" title="ട്രീ (ഡാറ്റാ സ്ട്രക്ചർ) – malayalam" lang="ml" hreflang="ml" data-title="ട്രീ (ഡാറ്റാ സ്ട്രക്ചർ)" data-language-autonym="മലയാളം" data-language-local-name="malayalam" 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%9C%D0%BE%D0%B4_(%D3%A9%D0%B3%D3%A9%D0%B3%D0%B4%D0%BB%D0%B8%D0%B9%D0%BD_%D0%B1%D2%AF%D1%82%D1%8D%D1%86)" title="Мод (өгөгдлийн бүтэц) – mongolsk" lang="mn" hreflang="mn" data-title="Мод (өгөгдлийн бүтэц)" data-language-autonym="Монгол" data-language-local-name="mongolsk" class="interlanguage-link-target"><span>Монгол</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Boom_(datastructuur)" title="Boom (datastructuur) – nederlandsk" lang="nl" hreflang="nl" data-title="Boom (datastructuur)" data-language-autonym="Nederlands" data-language-local-name="nederlandsk" 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/Tre_(datastruktur)" title="Tre (datastruktur) – bokmål" lang="nb" hreflang="nb" data-title="Tre (datastruktur)" data-language-autonym="Norsk bokmål" data-language-local-name="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/Drzewo_(informatyka)" title="Drzewo (informatyka) – polsk" lang="pl" hreflang="pl" data-title="Drzewo (informatyka)" 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_(estrutura_de_dados)" title="Árvore (estrutura de dados) – portugisisk" lang="pt" hreflang="pt" data-title="Árvore (estrutura de dados)" 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-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%94%D0%B5%D1%80%D0%B5%D0%B2%D0%BE_(%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="Дерево (структура данных) – 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/Stablo_(struktura_podataka)" title="Stablo (struktura podataka) – serbokroatisk" lang="sh" hreflang="sh" data-title="Stablo (struktura podataka)" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="serbokroatisk" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Tree_(data_structure)" title="Tree (data structure) – Simple English" lang="en-simple" hreflang="en-simple" data-title="Tree (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-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/Drevo_(podatkovna_struktura)" title="Drevo (podatkovna struktura) – slovensk" lang="sl" hreflang="sl" data-title="Drevo (podatkovna struktura)" data-language-autonym="Slovenščina" data-language-local-name="slovensk" 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/%D0%A1%D1%82%D0%B0%D0%B1%D0%BB%D0%BE_(%D1%81%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%B0_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0)" title="Стабло (структура података) – serbisk" lang="sr" hreflang="sr" data-title="Стабло (структура података)" 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/Tr%C3%A4d_(datastruktur)" title="Träd (datastruktur) – svensk" lang="sv" hreflang="sv" data-title="Träd (datastruktur)" data-language-autonym="Svenska" data-language-local-name="svensk" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%AE%E0%AE%B0%E0%AE%AE%E0%AF%8D_(%E0%AE%A4%E0%AE%B0%E0%AE%B5%E0%AF%81%E0%AE%95%E0%AF%8D_%E0%AE%95%E0%AE%9F%E0%AF%8D%E0%AE%9F%E0%AE%AE%E0%AF%88%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AF%81)" title="மரம் (தரவுக் கட்டமைப்பு) – tamil" lang="ta" hreflang="ta" data-title="மரம் (தரவுக் கட்டமைப்பு)" data-language-autonym="தமிழ்" data-language-local-name="tamil" class="interlanguage-link-target"><span>தமிழ்</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%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="ต้นไม้ (โครงสร้างข้อมูล) – 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-tl mw-list-item"><a href="https://tl.wikipedia.org/wiki/Puno_(estruktura_ng_datos)" title="Puno (estruktura ng datos) – tagalog" lang="tl" hreflang="tl" data-title="Puno (estruktura ng datos)" data-language-autonym="Tagalog" data-language-local-name="tagalog" class="interlanguage-link-target"><span>Tagalog</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/A%C4%9Fa%C3%A7_(veri_yap%C4%B1s%C4%B1)" title="Ağaç (veri yapısı) – tyrkisk" lang="tr" hreflang="tr" data-title="Ağaç (veri yapısı)" 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%B5%D1%80%D0%B5%D0%B2%D0%BE_(%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="Дерево (структура даних) – 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_(c%E1%BA%A5u_tr%C3%BAc_d%E1%BB%AF_li%E1%BB%87u)" title="Cây (cấu trúc dữ liệu) – vietnamesisk" lang="vi" hreflang="vi" data-title="Cây (cấu trúc dữ liệu)" 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/%E6%A0%91_(%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84)" 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/%E6%A8%B9_(%E6%8A%BD%E8%B1%A1%E8%B3%87%E6%96%99%E9%A1%9E%E5%9E%8B)" 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/Q223655#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/Tr%C3%A6_(datastruktur)" title="Se indholdssiden [c]" accesskey="c"><span>Artikel</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Diskussion:Tr%C3%A6_(datastruktur)&action=edit&redlink=1" rel="discussion" class="new" title="Diskussion om indholdet på siden (ikke skrevet endnu) [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/Tr%C3%A6_(datastruktur)"><span>Læs</span></a></li><li id="ca-ve-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Tr%C3%A6_(datastruktur)&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=Tr%C3%A6_(datastruktur)&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=Tr%C3%A6_(datastruktur)&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/Tr%C3%A6_(datastruktur)"><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=Tr%C3%A6_(datastruktur)&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=Tr%C3%A6_(datastruktur)&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=Tr%C3%A6_(datastruktur)&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/Tr%C3%A6_(datastruktur)" 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/Tr%C3%A6_(datastruktur)" 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=Tr%C3%A6_(datastruktur)&oldid=9712614" 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=Tr%C3%A6_(datastruktur)&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=Tr%C3%A6_%28datastruktur%29&id=9712614&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%2FTr%25C3%25A6_%28datastruktur%29"><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%2FTr%25C3%25A6_%28datastruktur%29"><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=Tr%C3%A6+%28datastruktur%29"><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=Tr%C3%A6_%28datastruktur%29&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=Tr%C3%A6_(datastruktur)&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:Tree_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/Q223655" 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"><dl><dd><span typeof="mw:File"><span><img src="//upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Disambig_bordered_fade.svg/19px-Disambig_bordered_fade.svg.png" decoding="async" width="19" height="15" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Disambig_bordered_fade.svg/29px-Disambig_bordered_fade.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Disambig_bordered_fade.svg/38px-Disambig_bordered_fade.svg.png 2x" data-file-width="236" data-file-height="185" /></span></span><i> For alternative betydninger, se <a href="/wiki/Tr%C3%A6" class="mw-disambig" title="Træ">Træ</a>.</i> <small>(<a href="/wiki/Speciel:Pr%C3%A6fiksindeks/Tr%C3%A6" title="Speciel:Præfiksindeks/Træ">Se også artikler, som begynder med Træ</a>)</small></dd></dl> <figure typeof="mw:File/Thumb"><a href="/wiki/Fil:Balanced_tree.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/3/33/Balanced_tree.png/250px-Balanced_tree.png" decoding="async" width="250" height="173" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/33/Balanced_tree.png/375px-Balanced_tree.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/3/33/Balanced_tree.png/500px-Balanced_tree.png 2x" data-file-width="1351" data-file-height="934" /></a><figcaption>Balanceret træ med 4 niveauer</figcaption></figure><p><b>Træet</b> som <a href="/wiki/Datastruktur" title="Datastruktur">datastruktur</a> bruges i mange sammenhænge. De bruges både i forbindelse med opbevaring af data og i forbindelse med <a href="/w/index.php?title=Sortering_(datalogi)&action=edit&redlink=1" class="new" title="Sortering (datalogi) (ikke skrevet endnu)">sortering</a>. Fordelen ved en træstruktur er, at den er fleksibel og kan bruges forholdsvis effektivt både til sekventiel gennemlæsning af data og til direkte opslag. Et træ vises som regel med roden øverst og med grene, der vokser ned ad. </p><p><a href="/wiki/Filsystem" title="Filsystem">Filsystemer</a> er ofte lavet så <a href="/wiki/Fil_(dataobjekt)" title="Fil (dataobjekt)">filerne</a> kan tilgås i en træstruktur hvor mapper kan have undermapper. </p><p>Alle træer er <a href="/wiki/Grafteori" title="Grafteori">acykliske grafer</a>, selvom ikke alle acykliske grafer er træer. </p> <div class="mw-heading mw-heading2"><h2 id="Terminologi">Terminologi</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Tr%C3%A6_(datastruktur)&veaction=edit&section=1" title="Redigér afsnit: Terminologi" class="mw-editsection-visualeditor"><span>redigér</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Tr%C3%A6_(datastruktur)&action=edit&section=1" title="Edit section's source code: Terminologi"><span>rediger kildetekst</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Der bruges en række ord med specielle betydninger, når det drejer sig om træstrukturer. </p> <ul><li>En <i>knude</i> indeholder information og referencer til andre knuder.</li> <li><i>Roden</i> er den knude som er udgangspunktet for træet. Den er rød på figuren.</li> <li>En <i>gren</i>, eller <i>kant</i>, forbinder to knuder.</li> <li>Et <i>blad</i> eller en <i>bladknude</i> er en knude, der ikke refererer til knuder længere nede i træet. De er vist som grønne på figuren.</li> <li>Et undertræ består af en knude og alle knuder, der er referencer til herfra. Det gælder både direkte og indirekte referencer.</li> <li><i>Højden</i> for et træ/undertræ er det maksimale antal knuder, man kan tælle fra træets/undertræets rod i retning af bladknuderne.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Gængse_træstrukturer"><span id="G.C3.A6ngse_tr.C3.A6strukturer"></span>Gængse træstrukturer</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Tr%C3%A6_(datastruktur)&veaction=edit&section=2" title="Redigér afsnit: Gængse træstrukturer" class="mw-editsection-visualeditor"><span>redigér</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Tr%C3%A6_(datastruktur)&action=edit&section=2" title="Edit section's source code: Gængse træstrukturer"><span>rediger kildetekst</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Bin%C3%A6rt_s%C3%B8getr%C3%A6" title="Binært søgetræ">Binært søgetræ</a></li> <li><a href="/wiki/R%C3%B8d-sort_tr%C3%A6" title="Rød-sort træ">Rød-sort træ</a></li> <li><a href="/wiki/AVL-tr%C3%A6" title="AVL-træ">AVL-træ</a></li> <li><a href="/w/index.php?title=B-tr%C3%A6&action=edit&redlink=1" class="new" title="B-træ (ikke skrevet endnu)">B-træ</a></li> <li><a href="/w/index.php?title=Bplus-tr%C3%A6&action=edit&redlink=1" class="new" title="Bplus-træ (ikke skrevet endnu)">B+-træ</a></li> <li><a href="/w/index.php?title=Bin%C3%A6r_hob&action=edit&redlink=1" class="new" title="Binær hob (ikke skrevet endnu)">Binær hob</a></li> <li><a href="/w/index.php?title=IPR-tr%C3%A6&action=edit&redlink=1" class="new" title="IPR-træ (ikke skrevet endnu)">IPR-træ</a></li> <li><a href="/wiki/Document_Object_Model" title="Document Object Model">Document Object Model</a></li></ul> <div style="clear:both; visibility:false; display:none"></div><table class="" style="width: 100%; float: none; margin: 0 auto; border-collapse: collapse; background: #FBFBFB; border: 1px solid #aaa; border-left: 10px solid #66bb77;padding: 0.25em 0.5em;"> <tbody><tr><td style="padding: 0.25em 0.5em;"><span class="metadata"><span typeof="mw:File"><a href="/wiki/Fil:Software_spanner.png" class="mw-file-description" title="Programmering"><img alt="Programmering" src="//upload.wikimedia.org/wikipedia/commons/thumb/8/82/Software_spanner.png/35px-Software_spanner.png" decoding="async" width="35" height="27" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/8/82/Software_spanner.png/53px-Software_spanner.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/8/82/Software_spanner.png/70px-Software_spanner.png 2x" data-file-width="239" data-file-height="184" /></a></span></span></td><td style="width:100%"><b>Spire</b><br /><div style="font-size:85%;line-height:135%;">Denne artikel om <a href="/wiki/Datalogi" title="Datalogi">datalogi</a> eller et datalogi-relateret emne er en <a href="/wiki/Hj%C3%A6lp:Stub" title="Hjælp:Stub">spire</a> som bør udbygges. Du er velkommen til at <a href="/wiki/Hj%C3%A6lp:Artikeludvidelse" title="Hjælp:Artikeludvidelse">hjælpe</a> Wikipedia ved at <span class="plainlinks"><a class="external text" href="https://da.wikipedia.org/w/index.php?title=Tr%C3%A6_(datastruktur)&action=edit">udvide den</a></span>.</div></td></tr></tbody></table><div style="clear:both; visibility:false; display:none"></div> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐59776cd8c7‐dw2hd Cached time: 20241120220534 Cache expiry: 2592000 Reduced expiry: false Complications: [] CPU time usage: 0.031 seconds Real time usage: 0.307 seconds Preprocessor visited node count: 153/1000000 Post‐expand include size: 3226/2097152 bytes Template argument size: 675/2097152 bytes Highest expansion depth: 8/100 Expensive parser function count: 0/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 0/5000000 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 21.647 1 -total 83.39% 18.051 1 Skabelon:Datalogistub 68.87% 14.909 1 Skabelon:Standardstub 25.52% 5.524 1 Skabelon:Hønsedesign 17.17% 3.717 1 Skabelon:Artikel_eller_andet 15.89% 3.439 1 Skabelon:Harflertydig --> <!-- Saved in parser cache with key dawiki:pcache:idhash:57513-0!canonical and timestamp 20241120220534 and revision id 9712614. 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=Træ_(datastruktur)&oldid=9712614">https://da.wikipedia.org/w/index.php?title=Træ_(datastruktur)&oldid=9712614</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">Kategorier</a>: <ul><li><a href="/wiki/Kategori:Datastrukturer" title="Kategori:Datastrukturer">Datastrukturer</a></li><li><a href="/wiki/Kategori:Grafteori" title="Kategori:Grafteori">Grafteori</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Skjulte kategorier: <ul><li><a href="/wiki/Kategori:P%C3%A5begyndte_datalogi-artikler" title="Kategori:Påbegyndte datalogi-artikler">Påbegyndte datalogi-artikler</a></li><li><a href="/wiki/Kategori:P%C3%A5begyndte_artikler_(samlet_liste)" title="Kategori:Påbegyndte artikler (samlet liste)">Påbegyndte artikler (samlet liste)</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 25. oktober 2018 kl. 09:23.</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=Tr%C3%A6_(datastruktur)&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-lljb8","wgBackendResponseTime":206,"wgPageParseReport":{"limitreport":{"cputime":"0.031","walltime":"0.307","ppvisitednodes":{"value":153,"limit":1000000},"postexpandincludesize":{"value":3226,"limit":2097152},"templateargumentsize":{"value":675,"limit":2097152},"expansiondepth":{"value":8,"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% 21.647 1 -total"," 83.39% 18.051 1 Skabelon:Datalogistub"," 68.87% 14.909 1 Skabelon:Standardstub"," 25.52% 5.524 1 Skabelon:Hønsedesign"," 17.17% 3.717 1 Skabelon:Artikel_eller_andet"," 15.89% 3.439 1 Skabelon:Harflertydig"]},"cachereport":{"origin":"mw-web.eqiad.main-59776cd8c7-dw2hd","timestamp":"20241120220534","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Tr\u00e6 (datastruktur)","url":"https:\/\/da.wikipedia.org\/wiki\/Tr%C3%A6_(datastruktur)","sameAs":"http:\/\/www.wikidata.org\/entity\/Q223655","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q223655","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-21T18:31:46Z","dateModified":"2018-10-25T08:23:00Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/3\/33\/Balanced_tree.png"}</script> </body> </html>