From 9fd9abd8e1a8e9f8f6c7c5b4dd522e5224a3400a Mon Sep 17 00:00:00 2001 From: Kevin Naughton Jr Date: Fri, 17 Feb 2017 23:30:50 -0500 Subject: [PATCH] added data structure descriptions --- .README.md.swp | Bin 0 -> 20480 bytes README.md | 23 +++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .README.md.swp diff --git a/.README.md.swp b/.README.md.swp new file mode 100644 index 0000000000000000000000000000000000000000..aa34a30a29c28f12a530c628e4981f401fe58d6e GIT binary patch literal 20480 zcmeI3e~e{UUBEAtQn9quiiv=Ur!MNwV`rwj-9lZYFuOCeJ9K7em^bW})=l=ld(V6C zGWXZsAM<8PfFdCTf+4XRh>6y1G&Eu?h)P1>4^u-^l}a_nUx`AuiT+DaVvUM^zUSWi z-puQ}ZXP^`EKXVb1Q4=Epx{${%*6ZXPy|*Cb!YFn#k%X*(K{v2p`W`${p9WMzV7Tz!bSp( z1R4o65@;mQNT88GBY{Q&jRao$63F5ktPj$SmzQ1nh4S-dW1p`mf8Sqz{`}bc8^+#m zkG(H{HXn@y8VNKKXe7``ppif$fkpz21R4o65@;mQNT89x4?zMp*Xw`uD$DBqIF)n% zU)lfv{u;~r9Q*-<5WxNLX1E=$-fCH&hmXU@U>CMv7H)vQzlHqp1bhlEK@1mQ9W3~h zS5r2;4j#YRvL1nlA%F*98SaI@q-~FYwDDGczXJY;@Ba-~;S2DG@OgL?ehYpBJ`Ep* zb1(<5hJT>1Ux0^U6W#UO(H2 zOk_v85-!|=lU`^id(#@_MB$E3 zvUZeY+FeKzdv7Z$a<#RcIQ?mPJ9d`&I_-Ng9auOS*@;`%u8vK!9qqojL6vk&lb5|D z&5DXA2zX%oe#*$5wliHTfpjkjbe4F|w3erR>2I1XdTA!@T27*1!S_$*p6@a~wS^}- zh<5Z!xMTaCyJ06f%=$X5Z%k}EUe|LLGJ2nR&UqT1Ec?-*PE3v;h5B@2$Njn#o#BYC z>K*N`C$3Jm5}PqhZNJJ?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Qs%x~E!i66VOSRrdF-o>p+BBrzH^w7T z>RM4=hgZpnd;?QkOz5C?jCp5=Tb0A6u50BAJBPge6bbKNY9rTZ)$-B5I(zZEc-W#1 zodh{H>=cIu?t~@R8#>_XS{LMgh5@oSy;V4dWYL~SAkjeVwted2#qBID$YHwkoFo>q zHB6`b#Jhyalb!0@a^RWb<|+%h_9)2F0)N?7w1lnTrF~g#wX~eeFU)$zMSbE&os6@xj(6Q z+l@9;eBX?PeT~bGGj`fHHsypVGGKDZWyp4&Fp4=;sKk+$sqKWgT%_%7e1_GWVB@Fv$j^w)z#(xpmO>p2ou!o)SlkQkz;kdEn*~Zi6NY*_ z>#y2)r_*eyI0mDALgV|ct4|LHX2EsWjiYmDjfnmKKJ5Sh6$a0!B`h_YzHC7N)F z@xy7_gi9RQHJWgVhb8p#2Ny2U;dn1W0K_Whd&ZIN`|XTCqUwxa?bqhuZ_Qb9C1LKH ztD8!5b;)UMcoSS+lgg#DTp7#d=-ggq*boKE*ZCPGWt^IH!73%0z&$?25*6cwZ`zLe zDC|mA7?wrNV<8b(?T5penIhm}Us%L}=S6-K2yx)~z5t2Q^GQ(>O8IjAspKNmPF0s1 zd>>D|e2*hcQ!ZqSzy|4}cyCNwC5pmUV&HM(D;K<@I10I)*((ceX%kyil|)iv8+@W# zOvpet_oqSXfq6z4bz!l7E-^IHy ztkIXth9clY>XcAjkxOYF$M|Vk aeAD8Wv;=;C~28)rZO literal 0 HcmV?d00001 diff --git a/README.md b/README.md index dc6f83ce..885f1487 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,13 @@ > Maintainer - [Kevin Naughton Jr.](https://github.com/kdn251) ## Table of Contents - - [Online Judges](#online-judges) - [Directory Tree](#directory-tree) - [Live Coding Practice](#live-coding-practice) - [Computer Science News](#computer-science-news) - [Data Structures](#data-structures) -## Online Judges +## Online Judges * [LeetCode](https://leetcode.com/) * [Virtual Judge](https://vjudge.net/) * [CareerCup](https://www.careercup.com/) @@ -29,12 +28,32 @@ * **Singly-linked list**: linked list in which nodes have pointers to the next node * **Doubly-linked list**: linked list in which nodes have pointers to *both* the previous node and the next node * Time Complexity: + * Access: `O(n)` * Search: `O(n)` * Insert: `O(1)` * Remove: `O(1)` * Stack + * A *Stack* is a collection of elements, with two principle operations: *push*, which adds to the collection, and + *pop*, which removes the most recently added element + * Last in, first out data structure (LIFO) * Queue + * A *Queue* is a collection of elements, supporting two principle operations: *enqueue*, which inserts an element + into the queue, and *dequeue*, which removes an element from the queue + * First in, first out data structure (FIFO) +* Tree + * A *Tree* is an undirected, connected, acyclic graph * Binary Tree + * A *Binary Tree* is a tree data structure in which each node has at most two children, which are referred to as + the *left child* and *right child* + * **Full Tree**: a tree in which every node has either 0 or 2 children + * **Perfect Binary Tree**: a binary tree in which all interior nodes have two children and all leave have the same depth + * **Complete Tree**: a binary tree in which every level *except possibly the last* is full and all nodes in the last + level are as far left as possible + * Time Complexity: + * Access: `O(log(n))` + * Search: `O(log(n))` + * Insert: `O(log(n))` + * Remove: `O(log(n))` * Binary Search Tree * Heap * Hashing