CINXE.COM
Koks (datu struktūra) — Vikipēdija
<!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="lv" dir="ltr"> <head> <meta charset="UTF-8"> <title>Koks (datu struktūra) — Vikipēdija</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(/(?:^|; )lvwikimwclientpreferences=([^;]+)/);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":"ydm","wgMonthNames":["","janvāris","februāris","marts","aprīlis","maijs","jūnijs","jūlijs","augusts","septembris","oktobris","novembris","decembris"],"wgRequestId":"5ad2e982-0aa1-41c9-957e-e0be0aebce65","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Koks_(datu_struktūra)","wgTitle":"Koks (datu struktūra)","wgCurRevisionId":3776174,"wgRevisionId":3776174,"wgArticleId":171856,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Raksti, kuros nav ievērots enciklopēdisks stils","Visi Vikipēdijas uzlabojamie raksti","Datu struktūras"],"wgPageViewLanguage":"lv","wgPageContentLanguage":"lv","wgPageContentModel":"wikitext","wgRelevantPageName":"Koks_(datu_struktūra)","wgRelevantArticleId":171856,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia", "wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"lv","pageLanguageDir":"ltr","pageVariantFallbacks":"lv"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":5000,"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};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"};RLPAGEMODULES=["mediawiki.page.media","site","mediawiki.page.ready","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.opacity-edit","ext.gadget.refToolbar","ext.gadget.edittop","ext.gadget.Editpage","ext.gadget.switcher","ext.gadget.wikibugs","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns", "ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=lv&modules=ext.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=lv&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=lv&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 name="viewport" content="width=1120"> <meta property="og:title" content="Koks (datu struktūra) — Vikipēdija"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//lv.m.wikipedia.org/wiki/Koks_(datu_strukt%C5%ABra)"> <link rel="alternate" type="application/x-wiki" title="Labot šo lapu" href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&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="Vikipēdija (lv)"> <link rel="EditURI" type="application/rsd+xml" href="//lv.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://lv.wikipedia.org/wiki/Koks_(datu_strukt%C5%ABra)"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.lv"> <link rel="alternate" type="application/atom+xml" title="Vikipēdija Atom padeve" href="/w/index.php?title=Special:RecentChanges&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-Koks_datu_struktūra rootpage-Koks_datu_struktūra skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Pāriet uz saturu</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="Vietne"> <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="Galvenā izvēlne" > <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">Galvenā izvēlne</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">Galvenā izvēlne</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">pārvietot uz sānjoslu</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">paslēpt</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigācija </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage" class="mw-list-item"><a href="/wiki/S%C4%81kumlapa" title="Iet uz sākumlapu [z]" accesskey="z"><span>Sākumlapa</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Vikip%C4%93dija:Kopienas_port%C4%81ls" title="Šeit Tu vari uzdot sev interesējošus jautājumus"><span>Kopienas portāls</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Vikip%C4%93dija:Aktualit%C4%81tes" title="Uzzini, kas nesen noticis Vikipēdijā"><span>Aktualitātes</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="Izmaiņas, kas nesen izdarītas Vikipēdijā [r]" accesskey="r"><span>Pēdējās izmaiņas</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Iet uz nejauši izvēlētu lapu [x]" accesskey="x"><span>Nejauša lapa</span></a></li><li id="n-help" class="mw-list-item"><a href="https://lv.wikipedia.org/wiki/Pal%C4%ABdz%C4%ABba:Saturs" title="Vieta, kur uzzināt par Vikipēdiju vairāk"><span>Palīdzība</span></a></li><li id="n-bug_in_article" class="mw-list-item"><a href="/wiki/Vikip%C4%93dija:Pazi%C5%86ojumi_par_k%C4%BC%C5%ABd%C4%81m"><span>Paziņot par kļūdu</span></a></li><li id="n-contact" class="mw-list-item"><a href="//lv.wikipedia.org/wiki/Vikipēdija:Kontakti"><span>Kontakti</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/S%C4%81kumlapa" 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="Vikipēdija" src="/static/images/mobile/copyright/wikipedia-wordmark-lv.svg" style="width: 7.5em; height: 1.375em;"> <img class="mw-logo-tagline" alt="Brīvā enciklopēdija" src="/static/images/mobile/copyright/wikipedia-tagline-lv.svg" width="120" height="15" style="width: 7.5em; height: 0.9375em;"> </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/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Meklēt Vikipēdijā [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Meklēt</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="Meklēt Vikipēdijā" aria-label="Meklēt Vikipēdijā" autocapitalize="sentences" title="Meklēt Vikipēdijā [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Meklēt</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Dalībnieka rīki"> <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="Izskats"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <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="Izskats" > <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">Izskats</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_lv.wikipedia.org&uselang=lv" class=""><span>Ziedojumi</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=Special:CreateAccount&returnto=Koks+%28datu+strukt%C5%ABra%29" title="Ieteicams izveidot kontu un pieslēgties; tomēr tas nav obligāti." class=""><span>Izveidot jaunu Vikipēdijas kontu</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=Special:UserLogin&returnto=Koks+%28datu+strukt%C5%ABra%29" title="Aicinām tevi ieiet Vikipēdijā, tomēr tas nav obligāti. [o]" accesskey="o" class=""><span>Ieiet Vikipēdijā</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Vairāk iespēju" > <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="Dalībnieka rīki" > <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">Dalībnieka rīki</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Dalībnieka izvēlne" > <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_lv.wikipedia.org&uselang=lv"><span>Ziedojumi</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Koks+%28datu+strukt%C5%ABra%29" title="Ieteicams izveidot kontu un pieslēgties; tomēr tas nav obligāti."><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Izveidot jaunu Vikipēdijas kontu</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Koks+%28datu+strukt%C5%ABra%29" title="Aicinām tevi ieiet Vikipēdijā, tomēr tas nav obligāti. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Ieiet Vikipēdijā</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Lapas redaktoriem, kuri nav pieslēgušies <a href="/wiki/Vikip%C4%93dija:Ievads" aria-label="Uzzini vairāk par rediģēšanu"><span>uzzināt vairāk</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="Labojumi, kas veikti no šīs IP adreses [y]" accesskey="y"><span>Devums</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Diskusija par labojumiem, kas izdarīti no šīs IP adreses [n]" accesskey="n"><span>Diskusijas</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Vietne"> <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="Saturs" 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">Saturs</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">pārvietot uz sānjoslu</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">paslēpt</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">Sākums</div> </a> </li> <li id="toc-Zari,_mezgli_un_lapas" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Zari,_mezgli_un_lapas"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Zari, mezgli un lapas</span> </div> </a> <ul id="toc-Zari,_mezgli_un_lapas-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Koku_veidi" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Koku_veidi"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Koku veidi</span> </div> </a> <ul id="toc-Koku_veidi-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Koku_operācijas" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Koku_operācijas"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Koku operācijas</span> </div> </a> <ul id="toc-Koku_operācijas-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="Saturs" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Pārslēgt satura rādītāju" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Pārslēgt satura rādītāju</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">Koks (datu struktūra)</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Pāriet uz rakstu citā valodā. Pieejams 43 valodās" > <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 valodas</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="شجرة (هياكل بيانات) – arābu" lang="ar" hreflang="ar" data-title="شجرة (هياكل بيانات)" data-language-autonym="العربية" data-language-local-name="arābu" 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="Дърво (структура от данни) – bulgāru" lang="bg" hreflang="bg" data-title="Дърво (структура от данни)" data-language-autonym="Български" data-language-local-name="bulgāru" 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) – katalāņu" lang="ca" hreflang="ca" data-title="Arbre (estructura de dades)" data-language-autonym="Català" data-language-local-name="katalāņu" 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) – čehu" lang="cs" hreflang="cs" data-title="Strom (datová struktura)" data-language-autonym="Čeština" data-language-local-name="čehu" 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="Йывăç (панăлăхсен тытăмĕ) – čuvašu" lang="cv" hreflang="cv" data-title="Йывăç (панăлăхсен тытăмĕ)" data-language-autonym="Чӑвашла" data-language-local-name="čuvašu" class="interlanguage-link-target"><span>Чӑвашла</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Tr%C3%A6_(datastruktur)" title="Træ (datastruktur) – dāņu" lang="da" hreflang="da" data-title="Træ (datastruktur)" data-language-autonym="Dansk" data-language-local-name="dāņu" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Baum_(Datenstruktur)" title="Baum (Datenstruktur) – vācu" lang="de" hreflang="de" data-title="Baum (Datenstruktur)" data-language-autonym="Deutsch" data-language-local-name="vācu" 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) – angļu" lang="en" hreflang="en" data-title="Tree (abstract data type)" data-language-autonym="English" data-language-local-name="angļu" 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) – spāņu" lang="es" hreflang="es" data-title="Árbol (informática)" data-language-autonym="Español" data-language-local-name="spāņu" 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) – igauņu" lang="et" hreflang="et" data-title="Puu (andmestruktuur)" data-language-autonym="Eesti" data-language-local-name="igauņu" 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="درخت (ساختار داده) – persiešu" lang="fa" hreflang="fa" data-title="درخت (ساختار داده)" data-language-autonym="فارسی" data-language-local-name="persiešu" 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) – somu" lang="fi" hreflang="fi" data-title="Puu (tietorakenne)" data-language-autonym="Suomi" data-language-local-name="somu" 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é – franču" lang="fr" hreflang="fr" data-title="Arbre enraciné" data-language-autonym="Français" data-language-local-name="franču" 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) – ungāru" lang="hu" hreflang="hu" data-title="Fa (adatszerkezet)" data-language-autonym="Magyar" data-language-local-name="ungāru" 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) – indonēziešu" lang="id" hreflang="id" data-title="Pohon (struktur data)" data-language-autonym="Bahasa Indonesia" data-language-local-name="indonēziešu" 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) – islandiešu" lang="is" hreflang="is" data-title="Tré (tölvunarfræði)" data-language-autonym="Íslenska" data-language-local-name="islandiešu" 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) – itāļu" lang="it" hreflang="it" data-title="Albero (informatica)" data-language-autonym="Italiano" data-language-local-name="itāļu" 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="木構造 (データ構造) – japāņu" lang="ja" hreflang="ja" data-title="木構造 (データ構造)" data-language-autonym="日本語" data-language-local-name="japāņu" 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="트리 구조 – korejiešu" lang="ko" hreflang="ko" data-title="트리 구조" data-language-autonym="한국어" data-language-local-name="korejiešu" 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) – lietuviešu" lang="lt" hreflang="lt" data-title="Medis (duomenų struktūra)" data-language-autonym="Lietuvių" data-language-local-name="lietuviešu" class="interlanguage-link-target"><span>Lietuvių</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="Дрво (податочна структура) – maķedoniešu" lang="mk" hreflang="mk" data-title="Дрво (податочна структура)" data-language-autonym="Македонски" data-language-local-name="maķedoniešu" 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="ട്രീ (ഡാറ്റാ സ്ട്രക്ചർ) – malajalu" lang="ml" hreflang="ml" data-title="ട്രീ (ഡാറ്റാ സ്ട്രക്ചർ)" data-language-autonym="മലയാളം" data-language-local-name="malajalu" 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="Мод (өгөгдлийн бүтэц) – mongoļu" lang="mn" hreflang="mn" data-title="Мод (өгөгдлийн бүтэц)" data-language-autonym="Монгол" data-language-local-name="mongoļu" 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) – holandiešu" lang="nl" hreflang="nl" data-title="Boom (datastructuur)" data-language-autonym="Nederlands" data-language-local-name="holandiešu" 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) – norvēģu bukmols" lang="nb" hreflang="nb" data-title="Tre (datastruktur)" data-language-autonym="Norsk bokmål" data-language-local-name="norvēģu bukmols" 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) – poļu" lang="pl" hreflang="pl" data-title="Drzewo (informatyka)" data-language-autonym="Polski" data-language-local-name="poļu" 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) – portugāļu" lang="pt" hreflang="pt" data-title="Árvore (estrutura de dados)" data-language-autonym="Português" data-language-local-name="portugāļu" 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="Дерево (структура данных) – krievu" lang="ru" hreflang="ru" data-title="Дерево (структура данных)" data-language-autonym="Русский" data-language-local-name="krievu" 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) – serbu–horvātu" lang="sh" hreflang="sh" data-title="Stablo (struktura podataka)" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="serbu–horvātu" 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) – slovēņu" lang="sl" hreflang="sl" data-title="Drevo (podatkovna struktura)" data-language-autonym="Slovenščina" data-language-local-name="slovēņu" 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="Стабло (структура података) – serbu" lang="sr" hreflang="sr" data-title="Стабло (структура података)" data-language-autonym="Српски / srpski" data-language-local-name="serbu" 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) – zviedru" lang="sv" hreflang="sv" data-title="Träd (datastruktur)" data-language-autonym="Svenska" data-language-local-name="zviedru" 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="மரம் (தரவுக் கட்டமைப்பு) – tamilu" lang="ta" hreflang="ta" data-title="மரம் (தரவுக் கட்டமைப்பு)" data-language-autonym="தமிழ்" data-language-local-name="tamilu" 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="ต้นไม้ (โครงสร้างข้อมูล) – taju" lang="th" hreflang="th" data-title="ต้นไม้ (โครงสร้างข้อมูล)" data-language-autonym="ไทย" data-language-local-name="taju" 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) – tagalu" lang="tl" hreflang="tl" data-title="Puno (estruktura ng datos)" data-language-autonym="Tagalog" data-language-local-name="tagalu" 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ı) – turku" lang="tr" hreflang="tr" data-title="Ağaç (veri yapısı)" data-language-autonym="Türkçe" data-language-local-name="turku" 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="Дерево (структура даних) – ukraiņu" lang="uk" hreflang="uk" data-title="Дерево (структура даних)" data-language-autonym="Українська" data-language-local-name="ukraiņu" 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) – vjetnamiešu" 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="vjetnamiešu" 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="树 (数据结构) – ķīniešu" lang="zh" hreflang="zh" data-title="树 (数据结构)" data-language-autonym="中文" data-language-local-name="ķīniešu" 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="樹 (抽象資料類型) – kantoniešu" lang="yue" hreflang="yue" data-title="樹 (抽象資料類型)" data-language-autonym="粵語" data-language-local-name="kantoniešu" 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="Labot starpvalodu saites" class="wbc-editpage">Labot saites</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="Vārdtelpas"> <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/Koks_(datu_strukt%C5%ABra)" title="Apskatīt rakstu [c]" accesskey="c"><span>Raksts</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Diskusija:Koks_(datu_strukt%C5%ABra)&action=edit&redlink=1" rel="discussion" class="new" title="Diskusija par šī raksta lapu (vēl nav uzrakstīts) [t]" accesskey="t"><span>Diskusija</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="Mainīt valodas variantu" > <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">latviešu</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="Apskates"> <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/Koks_(datu_strukt%C5%ABra)"><span>Skatīt</span></a></li><li id="ca-ve-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&veaction=edit" title="Labot šo lapu [v]" accesskey="v"><span>Labot šo lapu</span></a></li><li id="ca-edit" class="collapsible vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&action=edit" title="Labot šīs lapas pirmkodu [e]" accesskey="e"><span>Labot pirmkodu</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&action=history" title="Šīs lapas iepriekšējās versijas. [h]" accesskey="h"><span>Hronoloģija</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Lapas rīki"> <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="Rīki" > <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">Rīki</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">Rīki</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">pārvietot uz sānjoslu</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">paslēpt</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Vairāk iespēju" > <div class="vector-menu-heading"> Darbības </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/Koks_(datu_strukt%C5%ABra)"><span>Skatīt</span></a></li><li id="ca-more-ve-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&veaction=edit" title="Labot šo lapu [v]" accesskey="v"><span>Labot šo lapu</span></a></li><li id="ca-more-edit" class="collapsible vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&action=edit" title="Labot šīs lapas pirmkodu [e]" accesskey="e"><span>Labot pirmkodu</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&action=history"><span>Hronoloģija</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> Vispārīgi </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Koks_(datu_strukt%C5%ABra)" title="Visas Vikipēdijas lapas, kurās ir saites uz šejieni [j]" accesskey="j"><span>Norādes uz šo rakstu</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Koks_(datu_strukt%C5%ABra)" rel="nofollow" title="Izmaiņas, kas nesen izdarītas lapās, kurās ir saites uz šo lapu [k]" accesskey="k"><span>Saistītās izmaiņas</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="Visu īpašo lapu uzskaitījums [q]" accesskey="q"><span>Īpašās lapas</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&oldid=3776174" title="Paliekoša saite uz šo lapas versiju"><span>Pastāvīgā saite</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&action=info" title="Vairāk informācijas par šo lapu"><span>Lapas informācija</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=Koks_%28datu_strukt%C5%ABra%29&id=3776174&wpFormIdentifier=titleform" title="Kā pareizi atsaukties uz šo rakstu"><span>Atsauce uz šo lapu</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Flv.wikipedia.org%2Fwiki%2FKoks_%28datu_strukt%25C5%25ABra%29"><span>Iegūt saīsinātu URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Flv.wikipedia.org%2Fwiki%2FKoks_%28datu_strukt%25C5%25ABra%29"><span>Lejupielādēt QR kodu</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"> Drukāt/eksportēt </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=Special:Book&bookcmd=book_creator&referer=Koks+%28datu+strukt%C5%ABra%29"><span>Izveidot grāmatu</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Koks_%28datu_strukt%C5%ABra%29&action=show-download-screen"><span>Lejupielādēt kā PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&printable=yes" title="Drukājama lapas versija [p]" accesskey="p"><span>Drukājama versija</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"> Citos projektos </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>Vikikrātuve</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="Saistītais Vikidatu ieraksts [g]" accesskey="g"><span>Ieraksts Vikidatos</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="Lapas rīki"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Izskats"> <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">Izskats</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">pārvietot uz sānjoslu</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">paslēpt</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">Vikipēdijas lapa</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="lv" dir="ltr"><table class="metadata plainlinks ambox ambox-style" role="presentation"><tbody><tr><td class="mbox-image"><div style="width:52px;"><span typeof="mw:File"><a href="/wiki/Att%C4%93ls:Crystal_Clear_app_kedit.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/7/70/Crystal_Clear_app_kedit.png/20px-Crystal_Clear_app_kedit.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/70/Crystal_Clear_app_kedit.png/30px-Crystal_Clear_app_kedit.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/70/Crystal_Clear_app_kedit.png/40px-Crystal_Clear_app_kedit.png 2x" data-file-width="128" data-file-height="128" /></a></span></div></td><td class="mbox-text" style="text-align:center;;"><div class="mbox-text-span"><b>Šajā rakstā nav ievērots <a href="/wiki/Pal%C4%ABdz%C4%ABba:Stila_rokasgr%C4%81mata" title="Palīdzība:Stila rokasgrāmata">enciklopēdisks valodas stils</a></b> <br /><small>Lūdzu, palīdzi <a class="external text" href="https://lv.wikipedia.org/w/index.php?title=Koks_(datu_strukt%C5%ABra)&action=edit">uzlabot šo rakstu</a>, pārrakstot to. Ja ir kādi ieteikumi, vari tos pievienot <a href="/w/index.php?title=Diskusija:Koks_(datu_strukt%C5%ABra)&action=edit&redlink=1" class="new" title="Diskusija:Koks (datu struktūra) (vēl nav uzrakstīts)">diskusijā</a>. Vairāk lasi <a href="/wiki/Pal%C4%ABdz%C4%ABba:%C4%AAsa_lieto%C5%A1anas_pam%C4%81c%C4%ABba" title="Palīdzība:Īsa lietošanas pamācība">lietošanas pamācībā</a>.</small><div class="hide-when-compact"></div><div class="hide-when-compact"></div></div></td></tr></tbody></table> <style data-mw-deduplicate="TemplateStyles:r3201466">body.skin-minerva .mw-parser-output .mbox-text{text-align:left!important}body.skin-minerva .mw-parser-output .mbox-text-span{display:inline-block}</style> <p><b>Koks</b> ir <a href="/wiki/Datu_strukt%C5%ABras" title="Datu struktūras">datu struktūra</a> - mezglpunktu (<a href="/wiki/Datu_elements" title="Datu elements">mezglu</a>) kopa (var būt tukša), kas satur sakni, kurai ir nulle vai vairāk apakškoku. Katrs apakškoks atbilst koka definīcijai. Tātad koka definīcija ietver rekursiju, kur katrā zarā ir stingras norādes. Ja objekts vai jebkāda informācija var tikt sadalīta sīkākās daļās, un daļas, attiecīgi, vēl sīkākās, var tikt izmantota koku datu struktūra dalījuma attēlošanai. Galvenā koka priekšrocība pār citām datu struktūrām ir veiksmīgā hierarhijas attēlošana. Tā kā ar šo struktūru var viegli organizēt <a href="/wiki/Inform%C4%81cija" title="Informācija">informācijas</a> apstrādi un glabāšanu, tad koku datu struktūra ir viena no svarīgākajām <a href="/wiki/Datorzin%C4%81tne" title="Datorzinātne">datorzinātnē</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Zari,_mezgli_un_lapas"><span id="Zari.2C_mezgli_un_lapas"></span>Zari, mezgli un lapas</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&veaction=edit&section=1" title="Labot sadaļu: Zari, mezgli un lapas" class="mw-editsection-visualeditor"><span>labot šo sadaļu</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&action=edit&section=1" title="Labot sadaļas vikikodu: Zari, mezgli un lapas"><span>labot pirmkodu</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/Att%C4%93ls:Tree-data-structure.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Tree-data-structure.svg/220px-Tree-data-structure.svg.png" decoding="async" width="220" height="134" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Tree-data-structure.svg/330px-Tree-data-structure.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/45/Tree-data-structure.svg/440px-Tree-data-structure.svg.png 2x" data-file-width="1638" data-file-height="994" /></a><figcaption>Koka piemērs. Saknes mezgls - 50, lapu mezgli - 9, 14, 19, 64, 76.</figcaption></figure> <p>Šī tipa struktūru var labi paskaidrot ar <a href="/w/index.php?title=Windows_Explorer&action=edit&redlink=1" class="new" title="Windows Explorer (vēl nav uzrakstīts)">Windows Explorer</a> piemēru, kas parāda mapju, direktoriju un <a href="/wiki/Fails" class="mw-redirect" title="Fails">failu</a> struktūru, kas atrodas šajās mapēs. </p><p>Koks satur tādus objektus kā mezgli un lapas. Tiem jāatbilst šādiem noteikumiem: </p> <ul><li>Mezgli var atrasties jebkurā līmenī datu struktūrā, kur 1. līmenis ir augšpuse un n līmenis ir apakša.</li> <li>Mezgls, kas atrodas 1. līmenī, tiek saukts par saknes mezglu.</li> <li>Viens mezgls, kuram nav šķautņu (zaru), arī tiek saukts par koku.</li> <li>Apakšējam zaram (bērnam) ir jābūt saistītam ar to vecāku, kas ir tieši 1 līmeni augstāk par viņu.</li> <li>Vienam vecākam var būt bezgalīgi daudz bērnu, bet bērnam var būt tikai viens vecāks.</li> <li>Tie mezgli (bērni) vienā līmenī, kuriem ir viens kopīgs vecāks, tiek saukti par kaimiņiem.</li> <li>Tāds mezgls, kuram nav bērnu, tiek saukts par lapu.</li> <li>Kokam ir divi lielumi – augstums un dziļums.</li> <li>Augstums ir līmeņu skaits no saknes mezgla līdz pēdējai lapai.</li> <li>Dziļums ir zaru skaits līdz pēdējam bērnam (lapai). Dziļums = Augstums – 1;</li></ul> <p>Windows pārlūkā kā zari tiek reprezentētas mapes (direktoriji), kuru sakne var būt diski C vai D, kas neietilpst nevienā citā direktorijā – nav bērns nevienam mezglam. Lapas ir faili, jo tajos neietilpst citi lielumi (citi faili vai mapes) – tie ir koka mazākie elementi. </p> <div class="mw-heading mw-heading2"><h2 id="Koku_veidi">Koku veidi</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&veaction=edit&section=2" title="Labot sadaļu: Koku veidi" class="mw-editsection-visualeditor"><span>labot šo sadaļu</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&action=edit&section=2" title="Labot sadaļas vikikodu: Koku veidi"><span>labot pirmkodu</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>Kokus var iedalīt kā sakārtotus un nesakārtotus.</li> <li>Sakārtots koks ir tāds, kurš ir veidots pēc noteikta <a href="/wiki/Algoritms" title="Algoritms">algoritma</a> – vecāks ir pēc kāda noteikta kritērija lielāks nekā bērns un var noteikt, kurš no bērniem ir pirmais (primārais) un kuri nākamie.</li> <li>Koks vēl var būt binārs – nosaukums jau norāda, ka struktūras pamatā ir skaitlis ‘2’. Tas nozīmē, ka katram vecākam var būt augstākais divi bērni. Papildu nosacījums – kreisajam bērnam vienmēr jābūt lielākam nekā labajam.</li> <li>Ja binārs koks ir sakārtots, tad tas atbilst iepriekšējiem nosacījumiem un pilns sakārtots binārs koks ir tāds, kur katram mezglam ir tieši divi bērni.</li> <li>Ja bināram kokam nav neviena mezgla, to sauc par tukšu koku un to mēdz apzīmēt ar NIL.</li> <li>Ja visām koka lapām ir vienāds dziļums, to sauc par perfektu bināru koku.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Koku_operācijas"><span id="Koku_oper.C4.81cijas"></span>Koku operācijas</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&veaction=edit&section=3" title="Labot sadaļu: Koku operācijas" class="mw-editsection-visualeditor"><span>labot šo sadaļu</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Koks_(datu_strukt%C5%ABra)&action=edit&section=3" title="Labot sadaļas vikikodu: Koku operācijas"><span>labot pirmkodu</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>Create (sakne) – Izveido koku, kas raksturojas ar sakni.</li> <li>Empty (sakne) – loģiskā funkcija, kura pārbauda, vai saknē ir vērtība.</li> <li>Find (sakne, pozīcija, zīme) – izvēlētajai saknei atgriež pozīciju (atrašanās vietu). Ja nevar atrast tā vietu kokā, tad atgriež jauno piešķirto zīmi.</li> <li>Add (sakne, mezgls) – Pievieno datus kokam (ar izvēlēto sakni, noteiktajā mezglā).</li> <li>Delete (sakne, mezgls) – Izmet datus no izvēlētās pozīcijas (skat. Add operāciju).</li> <li>Traverse (sakne) – Kokam ar izvēlēto sakni iziet visus mezglus atbilstoši hierarhijai.</li> <li>Parent (m) – Izvēlētajam mezglam atgriež tā vecāku vai NIL, ja vecāks nav atrasts.</li> <li>Children (m) – Tiek atgriezta bērnu kopa izvēlētajam mezglam. Tomēr tiek atgriezta nulle, ja izvēlētā ir lapa (bez bērniem).</li> <li>FirstChild (m) – Atgriež izvēlētā mezgla pirmo (mazāko/”vis-kreisāko”) bērnu vai, ja ‘m’ ir lapa, atgriež NIL.</li> <li>RightSibling (m) un LeftSibling(m) – Atgriež izvēlētā mezgla attiecīgi labo vai kreiso kaimiņu vai NIL, ja tāda nav. (Tikai bināram kokam).</li> <li>RightChild (m) un LeftChild(m) – Atgriež bērnus vai NIL (skat. iepriekš. operāciju).</li> <li>IsLeaf (m) – loģiska operācija, kas pārbauda, vai izvēlētajam mezglam nav bērnu vai ir tie(vai tā ir lapa vai nav). Tiek atgriezta viena no būla vērtībām – true vai false.</li> <li>Depth (m) – Kokam atgriež mezgla m dziļumu.</li> <li>Height (m) – Kokam atgriež mezgla m augstumu.</li></ul> <table cellspacing="0" class="navbox" style="border-spacing:0;"><tbody><tr><td style="padding:2px;"><table cellspacing="0" class="nowraplinks collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit;"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div class="plainlinks hlist navbar mini"><ul><li class="nv-skatīt"><a href="/wiki/Veidne:Datu_strukt%C5%ABras" title="Veidne:Datu struktūras"><abbr title="Skatīt šo veidni" style=";;;background:none transparent;border:none;">s</abbr></a></li><li class="nv-diskusija"><a href="/w/index.php?title=Veidnes_diskusija:Datu_strukt%C5%ABras&action=edit&redlink=1" class="new" title="Veidnes diskusija:Datu struktūras (vēl nav uzrakstīts)"><abbr title="Diskusija par šo veidni" style="color:#002bb8;;;;background:none transparent;border:none;">d</abbr></a></li><li class="nv-labot"><a class="external text" href="https://lv.wikipedia.org/w/index.php?title=Veidne:Datu_strukt%C5%ABras&action=edit"><abbr title="Labot šo veidni" style=";;;background:none transparent;border:none;">l</abbr></a></li></ul></div><div style="font-size:110%;"><a href="/wiki/Datu_strukt%C5%ABras" title="Datu struktūras">Datu struktūras</a></div></th></tr><tr style="height:2px;"><td colspan="2"></td></tr><tr><th scope="row" class="navbox-group">Tipi</th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;"> <ul><li><a href="/w/index.php?title=Kolekcijas_(datorika)&action=edit&redlink=1" class="new" title="Kolekcijas (datorika) (vēl nav uzrakstīts)">Kolekcijas</a></li> <li><a href="/w/index.php?title=Konteiners_(datu_strukt%C5%ABra)&action=edit&redlink=1" class="new" title="Konteiners (datu struktūra) (vēl nav uzrakstīts)">Konteiners</a></li></ul> </div></td></tr><tr style="height:2px;"><td colspan="2"></td></tr><tr><th scope="row" class="navbox-group"><a href="/wiki/Datu_mas%C4%ABvs" title="Datu masīvs">Masīvi</a></th><td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;"> <ul><li><a href="/w/index.php?title=Asociat%C4%ABvs_mas%C4%ABvs&action=edit&redlink=1" class="new" title="Asociatīvs masīvs (vēl nav uzrakstīts)">Asociatīvs masīvs</a></li> <li><a href="/w/index.php?title=Multimap&action=edit&redlink=1" class="new" title="Multimap (vēl nav uzrakstīts)">Multimap</a></li> <li><a href="/w/index.php?title=Kopa_(datorzin%C4%81tne)&action=edit&redlink=1" class="new" title="Kopa (datorzinātne) (vēl nav uzrakstīts)">Kopa</a></li> <li><a href="/w/index.php?title=Kopa_(datorzin%C4%81tne)&action=edit&redlink=1" class="new" title="Kopa (datorzinātne) (vēl nav uzrakstīts)">Multikopa</a></li> <li><a href="/wiki/Jauc%C4%93jtabula" title="Jaucējtabula">Jaucējtabula</a></li></ul> </div></td></tr><tr style="height:2px;"><td colspan="2"></td></tr><tr><th scope="row" class="navbox-group"><a href="/w/index.php?title=Saraksts_(datorika)&action=edit&redlink=1" class="new" title="Saraksts (datorika) (vēl nav uzrakstīts)">Saraksti</a></th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;"> <ul><li><a href="/w/index.php?title=Dubultsai%C5%A1u_saraksts&action=edit&redlink=1" class="new" title="Dubultsaišu saraksts (vēl nav uzrakstīts)">Dubultsaišu saraksts</a></li> <li><a href="/wiki/Saist%C4%ABts_saraksts" title="Saistīts saraksts">Saistīts saraksts</a></li> <li><a href="/wiki/Rinda_(datu_strukt%C5%ABra)" title="Rinda (datu struktūra)">Rinda</a></li> <li><a href="/wiki/Steks_(datu_strukt%C5%ABra)" title="Steks (datu struktūra)">Steks</a></li> <li><a href="/w/index.php?title=Ciklisks_saraksts&action=edit&redlink=1" class="new" title="Ciklisks saraksts (vēl nav uzrakstīts)">Ciklisks saraksts</a></li></ul> </div></td></tr><tr style="height:2px;"><td colspan="2"></td></tr><tr><th scope="row" class="navbox-group"><a class="mw-selflink selflink">Koki</a></th><td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;"> <ul><li><a href="/wiki/B_koks" title="B koks">B koks</a></li> <li><a href="/w/index.php?title=Bin%C4%81r%C4%81s_mekl%C4%93%C5%A1anas_koks&action=edit&redlink=1" class="new" title="Binārās meklēšanas koks (vēl nav uzrakstīts)">Binārās meklēšanas koks</a></li> <li><a href="/w/index.php?title=Kaudze_(datu_strukt%C5%ABra)&action=edit&redlink=1" class="new" title="Kaudze (datu struktūra) (vēl nav uzrakstīts)">Kaudze</a></li></ul> </div></td></tr><tr style="height:2px;"><td colspan="2"></td></tr><tr><th scope="row" class="navbox-group"><a href="/w/index.php?title=Grafs_(datu_strukt%C5%ABra)&action=edit&redlink=1" class="new" title="Grafs (datu struktūra) (vēl nav uzrakstīts)">Grafi</a></th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;"> <ul><li><a href="/w/index.php?title=Orient%C4%93ts_grafs&action=edit&redlink=1" class="new" title="Orientēts grafs (vēl nav uzrakstīts)">Orientēts grafs</a></li> <li><a href="/w/index.php?title=Orient%C4%93ts_aciklisks_grafs&action=edit&redlink=1" class="new" title="Orientēts aciklisks grafs (vēl nav uzrakstīts)">Orientēts aciklisks grafs</a></li> <li><a href="/w/index.php?title=Bin%C4%81r%C4%81_l%C4%93mumu_diagramma&action=edit&redlink=1" class="new" title="Binārā lēmumu diagramma (vēl nav uzrakstīts)">Binārā lēmumu diagramma</a></li></ul> </div></td></tr><tr style="height:2px;"><td colspan="2"></td></tr><tr><th scope="row" class="navbox-group">Jēdzieni</th><td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px;"><div style="padding:0em 0.25em;"> <ul><li><a href="/wiki/Datu_elements" title="Datu elements">Datu elements</a></li></ul> </div></td></tr><tr style="height:2px;"><td colspan="2"></td></tr><tr><td class="navbox-abovebelow hlist" colspan="2"><div> <ul><li><a href="/w/index.php?title=Datu_strukt%C5%ABru_uzskait%C4%ABjums&action=edit&redlink=1" class="new" title="Datu struktūru uzskaitījums (vēl nav uzrakstīts)">Datu struktūru uzskaitījums</a></li></ul> </div></td></tr></tbody></table></td></tr></tbody></table> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐594d4bbbb‐vcmdd Cached time: 20241101211811 Cache expiry: 2592000 Reduced expiry: false Complications: [] CPU time usage: 0.066 seconds Real time usage: 0.111 seconds Preprocessor visited node count: 295/1000000 Post‐expand include size: 14718/2097152 bytes Template argument size: 202/2097152 bytes Highest expansion depth: 11/100 Expensive parser function count: 1/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 249/5000000 bytes Lua time usage: 0.021/10.000 seconds Lua memory usage: 1320675/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 89.711 1 -total 85.21% 76.446 1 Veidne:Enciklopēdisks_stils 82.31% 73.843 1 Veidne:Uzlabošanas_veidne 76.91% 68.995 1 Veidne:Ambox 14.65% 13.143 1 Veidne:Datu_struktūras 9.59% 8.599 1 Veidne:Navbox 2.59% 2.324 1 Veidne:Category_handler 2.06% 1.847 1 Veidne:Yesno --> <!-- Saved in parser cache with key lvwiki:pcache:idhash:171856-0!canonical and timestamp 20241101211811 and revision id 3776174. 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="">Saturs iegūts no "<a dir="ltr" href="https://lv.wikipedia.org/w/index.php?title=Koks_(datu_struktūra)&oldid=3776174">https://lv.wikipedia.org/w/index.php?title=Koks_(datu_struktūra)&oldid=3776174</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:Categories" title="Special:Categories">Kategorija</a>: <ul><li><a href="/wiki/Kategorija:Datu_strukt%C5%ABras" title="Kategorija:Datu struktūras">Datu struktūras</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Slēptas kategorijas: <ul><li><a href="/wiki/Kategorija:Raksti,_kuros_nav_iev%C4%93rots_enciklop%C4%93disks_stils" title="Kategorija:Raksti, kuros nav ievērots enciklopēdisks stils">Raksti, kuros nav ievērots enciklopēdisks stils</a></li><li><a href="/wiki/Kategorija:Visi_Vikip%C4%93dijas_uzlabojamie_raksti" title="Kategorija:Visi Vikipēdijas uzlabojamie raksti">Visi Vikipēdijas uzlabojamie raksti</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"> Šī lapa pēdējoreiz labota: 2023. gada 29. janvāris plkst. 16.31.</li> <li id="footer-info-copyright">Teksts ir pieejams saskaņā ar <a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution/Share-Alike licenci</a>; var pastāvēt papildu ierobežojumi. Plašākai informācijai skatīt <a href="/wiki/Vikip%C4%93dija:Lieto%C5%A1anas_noteikumi" title="Vikipēdija:Lietošanas noteikumi">lietošanas noteikumus</a>.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privātuma politika</a></li> <li id="footer-places-about"><a href="/wiki/Vikip%C4%93dija:Par">Par Vikipēdiju</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Vikip%C4%93dija:Saist%C4%ABbu_atrunas">Saistību atrunas</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">Izstrādātāji</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/lv.wikipedia.org">Statistika</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Sīkdatņu deklarācija</a></li> <li id="footer-places-mobileview"><a href="//lv.m.wikipedia.org/w/index.php?title=Koks_(datu_strukt%C5%ABra)&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobilais skats</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-dtnhv","wgBackendResponseTime":178,"wgPageParseReport":{"limitreport":{"cputime":"0.066","walltime":"0.111","ppvisitednodes":{"value":295,"limit":1000000},"postexpandincludesize":{"value":14718,"limit":2097152},"templateargumentsize":{"value":202,"limit":2097152},"expansiondepth":{"value":11,"limit":100},"expensivefunctioncount":{"value":1,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":249,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 89.711 1 -total"," 85.21% 76.446 1 Veidne:Enciklopēdisks_stils"," 82.31% 73.843 1 Veidne:Uzlabošanas_veidne"," 76.91% 68.995 1 Veidne:Ambox"," 14.65% 13.143 1 Veidne:Datu_struktūras"," 9.59% 8.599 1 Veidne:Navbox"," 2.59% 2.324 1 Veidne:Category_handler"," 2.06% 1.847 1 Veidne:Yesno"]},"scribunto":{"limitreport-timeusage":{"value":"0.021","limit":"10.000"},"limitreport-memusage":{"value":1320675,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-594d4bbbb-vcmdd","timestamp":"20241101211811","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Koks (datu strukt\u016bra)","url":"https:\/\/lv.wikipedia.org\/wiki\/Koks_(datu_strukt%C5%ABra)","sameAs":"http:\/\/www.wikidata.org\/entity\/Q223655","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q223655","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2011-12-09T10:49:23Z","dateModified":"2023-01-29T14:31:45Z","headline":"abstrakts datu tips"}</script> </body> </html>