[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-657557-105":59,"doc-detail-657557-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","data-structure-diagrams-in-typst-cs240e-s25-solara-lin","Data Structure Diagrams in Typst - CS240E S25 Solara Lin","","Compilation of data-structure diagrams created for the CS240E Spring 2025 course using Typst, a functional programming and markup system with real-time previewing. Covers diagram construction for trees, skip lists, stacks, linked lists, hash tables, subtree diagrams, red-black trees, a-b trees, binomial heaps, AVL trees, Huffman trees, tries, quadtrees, and kd-trees, plus bonus structures like segment trees, function graphs, and Fenwick trees. Includes guidance comparing Typst to LaTeX macro workflows and demonstrates library-based drawing via modules such as cetz/tree and fletcher.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/data-structure-diagrams-in-typst-cs240e-s25-solara-lin/657557/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/data-structure-diagrams-in-typst-cs240e-s25-solara-lin/657557.png","ImageObject",300,407,{"name":92,"@type":93},"Cart","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-30","2026-10-26",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What is Typst and why is it useful for drawing data structure diagrams?","Question",{"text":112,"@type":113},"Typst combines functional programming with document markup and offers real-time previewing, which simplifies diagram drawing. It allows programming directly inside the document to adjust nodes and edges with minimal changes.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which Typst modules are referenced for generating the diagrams?",{"text":117,"@type":113},"The document mentions cetz/tree for general tree-style diagrams and fletcher for several other structures such as skip lists, stacks, and linked lists, including variations like highlighted search paths.",{"name":119,"@type":110,"acceptedAnswer":120},"What kinds of data structures are included in the diagram collection?",{"text":121,"@type":113},"The collection includes common structures like trees, skip lists, stacks, linked lists, hash tables (with and without chaining), red-black trees, a-b trees, heaps, and search-oriented structures like tries, quadtrees, and kd-trees. A bonus section adds segment trees, function graphs, and Fenwick trees.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},657557,1793052195,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":41},18829141979164,"https://eur-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Data Structure Diagrams in Typst  \nFrom CS240E S25  \nBy Solara Lin (S25 ISA)  \nContents  \n1 Preface .................................................................................................. 1  \n2 Diagrams ............................................................................................... 2  \n2.1 General Trees ..................................................................................... 2  \n2.2 Skip List ........................................................................................... 3  \n2.3 Stack .............................................................................................. 3  \n2.4 Linked List ........................................................................................ 4  \n2.5 Hash Table ........................................................................................ 4  \n2.5.1 Plain ....................................................................................... 4  \n2.5.2 With Chaining ............................................................................ 4  \n2.6 Subtree Diagram .................................................................................. 4  \n2.7 Red-Black Tree .................................................................................... 4  \n2.8 a-b Tree ........................................................................................... 5  \n2.9 Binomial Heap .................................................................................... 5  \n2.10 AVL Tree .......................................................................................... 5  \n2.11 Huffman Tree ..................................................................................... 6  \n2.12 Trie ................................................................................................ 6  \n2.12.1 Regular Trie ............................................................................... 7  \n2.12.2 Pruned Trie ................................................................................ 7  \n2.12.3 Compressed Trie .......................................................................... 7  \n2.12.4 Suffix Tree ................................................................................. 7  \n2.13 Quadtree .......................................................................................... 8  \n2.14 kd-tree ............................................................................................ 9  \n3 Bonus .................................................................................................. 10  \n3.1 Segment Tree .................................................................................... 10  \n3.2 Function Graph .................................................................................. 10  \n3.3 Fenwick Tree .................................................................................... 11  \n1 Preface  \nThis is a compilation of various data structures diagrams I made for CS240E course during Spring 2025 using Typst. Typst is a new typesetting tool: it is both a functional programming language anda markup language, with real-time previewing ability, which makes it very powerful and convenient to typeset documents, make slides, and draw diagrams. (P.S. All the tutorial slides in S25 term were made using Typst.)  \nFor example, you can define a skip list function, then draw it like this:  \n\\# skip-list ((  \n( 10 , 11 , 12 , 13 , 20 ) ,  \n( 11 , 12 , 13 , 20 ) ,  \n( 12 , 20 ) ,  \n(20 , ) ,  \n() ,  \n) )  \nSee the result.  \nCompared to LaTeX’s macro system, Typst lets you actually program in the document, which simplifies the process of drawing diagrams a lot: to insert a new node into the skip list, you only need to modify a little in the array, instead of manually relayouting all the nodes and edges as in LaTeX.  \nHowever, Typst and the ecosystem are still in an early development stage (but also stable enough for usual use), and the documents are not detailed enough and outdated, as the","cbCaitu97x5YAA74","https://ap.wps.com/l/cbCaitu97x5YAA74","pdf",115525,12,"English","# Preface\n# Diagrams\n## General Trees\n## Skip List\n## Stack\n## Linked List\n## Hash Table\n## Subtree Diagram\n## Red-Black Tree\n## a-b Tree\n## Binomial Heap\n## AVL Tree\n## Huffman Tree\n## Trie\n## Quadtree\n## kd-tree\n# Bonus\n## Segment Tree\n## Function Graph\n## Fenwick Tree","[{\"question\":\"What is Typst and why is it useful for drawing data structure diagrams?\",\"answer\":\"Typst combines functional programming with document markup and offers real-time previewing, which simplifies diagram drawing. It allows programming directly inside the document to adjust nodes and edges with minimal changes.\"},{\"question\":\"Which Typst modules are referenced for generating the diagrams?\",\"answer\":\"The document mentions cetz/tree for general tree-style diagrams and fletcher for several other structures such as skip lists, stacks, and linked lists, including variations like highlighted search paths.\"},{\"question\":\"What kinds of data structures are included in the diagram collection?\",\"answer\":\"The collection includes common structures like trees, skip lists, stacks, linked lists, hash tables (with and without chaining), red-black trees, a-b trees, heaps, and search-oriented structures like tries, quadtrees, and kd-trees. A bonus section adds segment trees, function graphs, and Fenwick trees.\"}]","Data Structure Diagrams in Typst - CS240E S25 Solara Lin | PDF",1792982817]