(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{68:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return r})),a.d(t,"metadata",(function(){return s})),a.d(t,"rightToc",(function(){return c})),a.d(t,"default",(function(){return p}));var n=a(2),l=a(6),o=(a(0),a(131)),i=a(132),r={title:"Data Structures"},s={unversionedId:"cheatsheets/datastruct",id:"cheatsheets/datastruct",isDocsHomePage:!1,title:"Data Structures",description:"- green lines for positive outcome of the decision elements",source:"@site/docs\\cheatsheets\\datastruct.md",slug:"/cheatsheets/datastruct",permalink:"/docs/cheatsheets/datastruct",version:"current",sidebar:"docs",previous:{title:"Dialog",permalink:"/docs/examples/other/dialog"},next:{title:"JavaScript",permalink:"/docs/cheatsheets/javascript"}},c=[{value:"Complexity of maps",id:"complexity-of-maps",children:[]}],u={rightToc:c};function p(e){var t=e.components,a=Object(l.a)(e,["components"]);return Object(o.b)("wrapper",Object(n.a)({},u,a,{components:t,mdxType:"MDXLayout"}),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"green lines for positive outcome of the decision elements"),Object(o.b)("li",{parentName:"ul"},"red lines for negative outcome of the decision elements")),Object(o.b)("img",{src:Object(i.a)("img/docs/data_structures.svg")}),Object(o.b)("h3",{id:"complexity-of-maps"},"Complexity of maps"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"HashMap",Object(o.b)("ul",{parentName:"li"},Object(o.b)("li",{parentName:"ul"},"complexity of O(1) for insertion and lookup."),Object(o.b)("li",{parentName:"ul"},"allows one null key and multiple null values."),Object(o.b)("li",{parentName:"ul"},"does not maintain any order."))),Object(o.b)("li",{parentName:"ul"},"TreeMap",Object(o.b)("ul",{parentName:"li"},Object(o.b)("li",{parentName:"ul"},"has complexity of O(logN) for insertion and lookup."),Object(o.b)("li",{parentName:"ul"},"does not allow null key but allow multiple null values."),Object(o.b)("li",{parentName:"ul"},"maintains order. It stores keys in sorted and ascending order."))),Object(o.b)("li",{parentName:"ul"},"LinkedHashMap",Object(o.b)("ul",{parentName:"li"},Object(o.b)("li",{parentName:"ul"},"has complexity of O(1) for insertion and lookup."),Object(o.b)("li",{parentName:"ul"},"allows one null key and multiple null values."),Object(o.b)("li",{parentName:"ul"},"maintains order in which key-value pairs are inserted.")))))}p.isMDXComponent=!0}}]);