blog/assets/js/0178f9ad.3a9b9184.js

1 line
23 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkfi=self.webpackChunkfi||[]).push([[9898],{5610:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var t=a(5893),s=a(1151);const r={id:"applications",title:"Pou\u017eit\xed \u010derveno-\u010dern\xfdch strom\u016f",description:"Uk\xe1zka pou\u017eit\xed \u010derveno-\u010dern\xfdch strom\u016f v standardn\xedch kni\u017enic\xedch zn\xe1m\xfdch jazyk\u016f.\n",tags:["balanced trees","red-black trees","applications"],last_update:{date:new Date("2022-04-05T00:00:00.000Z")}},i=void 0,l={id:"rb-trees/applications",title:"Pou\u017eit\xed \u010derveno-\u010dern\xfdch strom\u016f",description:"Uk\xe1zka pou\u017eit\xed \u010derveno-\u010dern\xfdch strom\u016f v standardn\xedch kni\u017enic\xedch zn\xe1m\xfdch jazyk\u016f.\n",source:"@site/algorithms/08-rb-trees/2022-04-05-applications.md",sourceDirName:"08-rb-trees",slug:"/rb-trees/applications",permalink:"/algorithms/rb-trees/applications",draft:!1,unlisted:!1,editUrl:"https://github.com/mfocko/blog/tree/main/algorithms/08-rb-trees/2022-04-05-applications.md",tags:[{label:"balanced trees",permalink:"/algorithms/tags/balanced-trees"},{label:"red-black trees",permalink:"/algorithms/tags/red-black-trees"},{label:"applications",permalink:"/algorithms/tags/applications"}],version:"current",lastUpdatedAt:1649116800,formattedLastUpdatedAt:"Apr 5, 2022",frontMatter:{id:"applications",title:"Pou\u017eit\xed \u010derveno-\u010dern\xfdch strom\u016f",description:"Uk\xe1zka pou\u017eit\xed \u010derveno-\u010dern\xfdch strom\u016f v standardn\xedch kni\u017enic\xedch zn\xe1m\xfdch jazyk\u016f.\n",tags:["balanced trees","red-black trees","applications"],last_update:{date:"2022-04-05T00:00:00.000Z"}},sidebar:"autogeneratedBar",previous:{title:"Red-Black Trees",permalink:"/algorithms/category/red-black-trees"},next:{title:"On the rules of the red-black tree",permalink:"/algorithms/rb-trees/rules"}},o={},c=[{value:"Pou\u017eit\xed",id:"pou\u017eit\xed",level:2},{value:"R\u016fzn\xe9 implementace",id:"r\u016fzn\xe9-implementace",level:2},{value:"C++",id:"c",level:3},{value:"clang",id:"clang",level:4},{value:"gcc",id:"gcc",level:4},{value:"Java",id:"java",level:3},{value:"C#",id:"c-1",level:3},{value:"Vztah mezi mno\u017einou a mapou",id:"vztah-mezi-mno\u017einou-a-mapou",level:2}];function d(e){const n={a:"a",annotation:"annotation",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",math:"math",mi:"mi",mo:"mo",mrow:"mrow",p:"p",pre:"pre",semantics:"semantics",span:"span",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"pou\u017eit\xed",children:"Pou\u017eit\xed"}),"\n",(0,t.jsx)(n.p,{children:"\u010cerveno-\u010dern\xe9 stromy jsou celkem obl\xedben\xe9 pro implementaci ADT mno\u017einy nebo slovn\xedku za p\u0159edpokladu, \u017ee nad vkl\xe1dan\xfdmi kl\xed\u010di existuje uspo\u0159\xe1d\xe1n\xed. Jazyky n\xed\u017ee implementuj\xed dan\xe9 datov\xe9 struktury v 2 variant\xe1ch a to:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"se\u0159azen\xe9: pou\u017e\xedvaj\xed na pozad\xed pr\xe1v\u011b \u010derveno-\u010dern\xfd strom"}),"\n",(0,t.jsx)(n.li,{children:"nese\u0159azen\xe9: pou\u017e\xedvaj\xed na pozad\xed ha\u0161ovac\xed tabulku"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Pro srovn\xe1n\xed, jak jsme si \u0159\xedkali na cvi\u010den\xed, \u010derveno-\u010dern\xfd strom m\xe1 operace hled\xe1n\xed, vkl\xe1d\xe1n\xed a maz\xe1n\xed v \u010dasov\xe9 slo\u017eitosti ",(0,t.jsxs)(n.span,{className:"katex",children:[(0,t.jsx)(n.span,{className:"katex-mathml",children:(0,t.jsx)(n.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,t.jsxs)(n.semantics,{children:[(0,t.jsxs)(n.mrow,{children:[(0,t.jsx)(n.mi,{mathvariant:"script",children:"O"}),(0,t.jsx)(n.mo,{stretchy:"false",children:"("}),(0,t.jsx)(n.mi,{children:"log"}),(0,t.jsx)(n.mo,{children:"\u2061"}),(0,t.jsx)(n.mi,{children:"n"}),(0,t.jsx)(n.mo,{stretchy:"false",children:")"})]}),(0,t.jsx)(n.annotatio