{"id":159,"date":"2014-09-24T21:29:35","date_gmt":"2014-09-25T03:29:35","guid":{"rendered":"http:\/\/jacobncalvert.com\/?p=159"},"modified":"2018-02-10T15:42:08","modified_gmt":"2018-02-10T21:42:08","slug":"generic-data-structures","status":"publish","type":"post","link":"https:\/\/jacobncalvert.com\/blog-archive\/2014\/09\/24\/generic-data-structures\/","title":{"rendered":"Generic Data Structures"},"content":{"rendered":"<p>I&#8217;m curently taking a class called\u00a0<i>Data Structures and Algorithms<\/i>. I decided I&#8217;d try to implement some common data structures of my own.<\/p>\n<p>These structures are mostly being built in a linked list style with the exception of the List struct which is built on an array that will auto-resize. You might ask, &#8220;why are you doing this, when there are already templated vectors and maps and such in the STL?&#8221; Mainly because I can!! I enjoy these things, and I wanted to try my hand at some of the most commonly used structures, but also I wanted to make them template based so that they are generic enough to be reusable in my other projects.<br \/>\nCurrently, I have the following structures done:<\/p>\n<ul>\n<li>List<\/li>\n<li>Queue<\/li>\n<li>Stack<\/li>\n<\/ul>\n<p>And the following are planned:<\/p>\n<ul>\n<li>Heap<\/li>\n<li>Red-Black Tree<\/li>\n<li>Binary Search Tree<\/li>\n<li>Others???<\/li>\n<\/ul>\n<p>I&#8217;ll keep adding to them hopefully until I have a whole set of generic data structures to use. If you&#8217;re interested in the code or usage, hop over to my\u00a0<a href=\"https:\/\/github.com\/jacobcalvert\">GitHub account<\/a>\u00a0to\u00a0<a href=\"https:\/\/github.com\/jacobcalvert\/GenericDataStructures\">see the project code and some examples.<\/a>\u00a0I hope to keep adding useful examples to the repository little by little. Thanks for reading!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m curently taking a class called\u00a0Data Structures and Algorithms. I decided I&#8217;d try to implement some common data structures of my own. These structures are mostly being built in a linked list style with the exception of the List struct which is built on an array that will auto-resize. You might ask, &#8220;why are you doing this, when there are already templated vectors and maps and such in the STL?&#8221; Mainly because I can!! I enjoy these things, and I&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[11],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Generic Data Structures - Jacob N Calvert<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jacobncalvert.com\/blog-archive\/2014\/09\/24\/generic-data-structures\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generic Data Structures - Jacob N Calvert\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m curently taking a class called\u00a0Data Structures and Algorithms. I decided I&#8217;d try to implement some common data structures of my own. These structures are mostly being built in a linked list style with the exception of the List struct which is built on an array that will auto-resize. You might ask, &#8220;why are you doing this, when there are already templated vectors and maps and such in the STL?&#8221; Mainly because I can!! I enjoy these things, and I&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jacobncalvert.com\/blog-archive\/2014\/09\/24\/generic-data-structures\/\" \/>\n<meta property=\"og:site_name\" content=\"Jacob N Calvert\" \/>\n<meta property=\"article:published_time\" content=\"2014-09-25T03:29:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-10T21:42:08+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#website\",\"url\":\"https:\/\/jacobncalvert.com\/blog-archive\/\",\"name\":\"Jacob N Calvert\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/jacobncalvert.com\/blog-archive\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2014\/09\/24\/generic-data-structures\/#webpage\",\"url\":\"https:\/\/jacobncalvert.com\/blog-archive\/2014\/09\/24\/generic-data-structures\/\",\"name\":\"Generic Data Structures - Jacob N Calvert\",\"isPartOf\":{\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#website\"},\"datePublished\":\"2014-09-25T03:29:35+00:00\",\"dateModified\":\"2018-02-10T21:42:08+00:00\",\"author\":{\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#\/schema\/person\/f4b22a996d41bf09ed2bbe22912a8c8a\"},\"breadcrumb\":{\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2014\/09\/24\/generic-data-structures\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jacobncalvert.com\/blog-archive\/2014\/09\/24\/generic-data-structures\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2014\/09\/24\/generic-data-structures\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/\",\"url\":\"https:\/\/jacobncalvert.com\/blog-archive\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2014\/09\/24\/generic-data-structures\/#webpage\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#\/schema\/person\/f4b22a996d41bf09ed2bbe22912a8c8a\",\"name\":\"Jacob\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/64a2dd1c00cb39dfc19bb1204c87efbc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/64a2dd1c00cb39dfc19bb1204c87efbc?s=96&d=mm&r=g\",\"caption\":\"Jacob\"},\"sameAs\":[\"https:\/\/jacobncalvert.com\"],\"url\":\"https:\/\/jacobncalvert.com\/blog-archive\/author\/jcalvert\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/posts\/159"}],"collection":[{"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/comments?post=159"}],"version-history":[{"count":1,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":160,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/posts\/159\/revisions\/160"}],"wp:attachment":[{"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/media?parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/categories?post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/tags?post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}