[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-670582-105":59,"doc-detail-670582-en":130,"doc-similar-670582":148},{"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","big-o-cheat-sheet-data-structures-and-algorithms-reference","Big O Cheat Sheet - Data Structures and Algorithms Reference","","This technical resource provides a comprehensive and concise reference for the time and space complexity of fundamental computer science concepts. It systematically outlines big O notation for various data structures, including arrays, hash tables, linked lists, and binary search trees, covering operations like search, insertion, and deletion. Furthermore, the document compares common sorting algorithms—such as quicksort, mergesort, and heapsort—evaluating their performance across best, worst, and average scenarios. Designed for software engineers and students preparing for technical coding interviews, this cheat sheet serves as an efficient tool for quick lookups and performance optimization analysis, ensuring developers can make informed decisions when selecting appropriate structures and algorithms for complex computational tasks.",{"@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/big-o-cheat-sheet-data-structures-and-algorithms-reference/670582/",{"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/big-o-cheat-sheet-data-structures-and-algorithms-reference/670582.png","ImageObject",300,407,{"name":92,"@type":93},"Fans","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-15","2026-11-01",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 the time complexity for searching in a Hash Table?","Question",{"text":112,"@type":113},"The time complexity for searching in a Hash Table is O(1) on average.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does the space complexity of Merge Sort compare to Insertion Sort?",{"text":117,"@type":113},"Merge Sort has a space complexity of O(n), whereas Insertion Sort has a space complexity of O(1).",{"name":119,"@type":110,"acceptedAnswer":120},"Which data structures offer O(1) time complexity for insertion?",{"text":121,"@type":113},"Queue, Stack, Hash Table, and LRU Cache provide O(1) time complexity for insertion operations.","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},670582,1793570140,{"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":8,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":81,"preview_page_count":8,"preview_urls":143},5909892330395,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","|  Interview Cake by Aced |  |  |  |  |\n| --- | --- | --- | --- | --- |\n| Big O Cheat Sheet\u003Cbr>A quick reference of the time and space complexity of all the major data structures and sorting algorithms\u003Cbr>Data Structures\u003Cbr>index search insert delete |  |  |  |  |\n| Array | \u003Cbr>O (1) | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (n) |\n| Dynamic Array | \u003Cbr>O (1) | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (n) |\n| Linked List | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (1) |\n| Queue | \u003Cbr>O (1) | \u003Cbr>O (n) | \u003Cbr>O (1) | \u003Cbr>O (1) |\n| Stack | \u003Cbr>O (1) | \u003Cbr>O (n) | \u003Cbr>O (1) | \u003Cbr>O (1) |\n| Hash Table | — | \u003Cbr>O (1) | \u003Cbr>O (1) | \u003Cbr>O (1) |\n| Binary Search Tree | \u003Cbr>O (lg n) | \u003Cbr>O (lg n) | \u003Cbr>O (lg n) | \u003Cbr>O (lg n) |\n| Trie | — | \u003Cbr>O (m) | \u003Cbr>O (m) | \u003Cbr>O (m) |\n| Heap | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (lg n) | \u003Cbr>O (n) |\n| Priority Queue | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (lg n) | \u003Cbr>O (1) |\n| Bloom filter | — | \u003Cbr>O (1) | \u003Cbr>O (1) | — |\n| LRU Cache\u003Cbr>Sorting Algorithms | —\u003Cbr>worst | \u003Cbr>O (1)\u003Cbr>best | \u003Cbr>O (1)\u003Cbr>average | \u003Cbr>O (1)\u003Cbr>space |\n| Selection Sort | \u003Cbr>O (n2 ) | \u003Cbr>O (n2 ) | \u003Cbr>O (n2 ) | \u003Cbr>O (1) |\n| Insertion Sort | \u003Cbr>O (n2 ) | \u003Cbr>O (n) | \u003Cbr>O (n2 ) | \u003Cbr>O (1) |\n| Merge Sort | \u003Cbr>O (nlgn) |  O (nlgn)  |  O (nlgn)  | \u003Cbr>O (n) |\n| Quicksort | \u003Cbr>O (n2 ) | \u003Cbr>O (nlgn) | \u003Cbr>O (nlgn) | \u003Cbr>O (lg n) |\n| Heapsort | \u003Cbr>O (nlgn) | \u003Cbr>O (n) |  O (nlgn)  | \u003Cbr>O (1) |\n| Counting Sort | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (n) |\n| Radix Sort | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (n) | \u003Cbr>O (n) |\n\n[Latest version:](Latest version: www.interviewcake.com/big-o-cheat-sheet)[ www.interviewcake.com/big-o-cheat-sheet](Latest version: www.interviewcake.com/big-o-cheat-sheet) · More free coding interview prep [at](at www.interviewcake.com)[ www.interviewcake.com](at www.interviewcake.com)  \n[www.interviewcake.com/big-o-cheat-sheet](www.interviewcake.com/big-o-cheat-sheet) · page 1 of 1","cbCaihIa0yToJp0m","https://ap.wps.com/l/cbCaihIa0yToJp0m","pdf",99603,"English","# Data Structures\n## Sorting Algorithms","[{\"question\":\"What is the time complexity for searching in a Hash Table?\",\"answer\":\"The time complexity for searching in a Hash Table is O(1) on average.\"},{\"question\":\"How does the space complexity of Merge Sort compare to Insertion Sort?\",\"answer\":\"Merge Sort has a space complexity of O(n), whereas Insertion Sort has a space complexity of O(1).\"},{\"question\":\"Which data structures offer O(1) time complexity for insertion?\",\"answer\":\"Queue, Stack, Hash Table, and LRU Cache provide O(1) time complexity for insertion operations.\"}]","Big O Cheat Sheet - Data Structures and Algorithms Reference | PDF",[144],{"page_no":8,"url":145,"width":146,"height":147},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/f20d84e3ae6e09b4ac09145e8808b08c.webp",983,1272,{"list":149,"token":66},[150,156,162,168,174,180,186,192,198,204],{"doc_id":151,"doc_title":152,"file_type":137,"home_preview_img_url":153,"slug":154,"view_count":81,"category_name":30,"create_tm":155},671623,"Data Structures Cheat Sheet - Time Complexity and Core Properties","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988381074/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=2CCOBMbDwzHvhoCRhOJeA19C78s%3D","data-structures-cheat-sheet-time-complexity-and-core-properties",1793577648,{"doc_id":157,"doc_title":158,"file_type":137,"home_preview_img_url":159,"slug":160,"view_count":24,"category_name":30,"create_tm":161},698707,"A Skip List Cookbook -  Version","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009278356/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=4m0PgJC4Y9TAbeFhQXA%2B2Brrlo8%3D","a-skip-list-cookbook-version",1794454937,{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":34,"category_name":30,"create_tm":167},697952,"Python Session 2 - Data Structures","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010141975/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=8X7JB5rhGwME71uBW2NdRLc%2FXVM%3D","python-session-2-data-structures",1794446325,{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":81,"category_name":30,"create_tm":173},685724,"LINKED LISTS - Chapter 3 - overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000182527/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=krHIRlOED33cc0NX5TT2jwbftJg%3D","linked-lists-chapter-3-overview",1794016986,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":19,"category_name":30,"create_tm":179},697962,"DATA STRUCTURES - Chapter 5 Basic Data Structures","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009214987/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=Sn6MhfobxOSW1l%2Fg1ln347LcT8E%3D","data-structures-chapter-5-basic-data-structures",1794446352,{"doc_id":181,"doc_title":182,"file_type":137,"home_preview_img_url":183,"slug":184,"view_count":19,"category_name":30,"create_tm":185},685792,"Array Implementation of List - Array Operations (Create, Insert, Delete, Display, Search)","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000212417/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=LV2cqmEJGdgWvY986z9CbQNM7Bc%3D","array-implementation-of-list-array-operations-create-insert-delete-display-search",1794018669,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":29,"category_name":30,"create_tm":191},697937,"Doubly Linked List - Basic Operations and Circular Linked List","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010136388/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=upYW7UlnKiM99yKnD3JHznOvc14%3D","doubly-linked-list-basic-operations-and-circular-linked-list",1794446062,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":81,"category_name":30,"create_tm":197},732880,"Linked List Basics - Linked List Basics - Insertion, Deletion, Navigation, and Advanced Operations","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031780344/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=4qOzk65WtlV4%2BzUC1IXiuSBFd%2Fs%3D","linked-list-basics-linked-list-basics-insertion-deletion-navigation-and-advanced-operations",1795382679,{"doc_id":199,"doc_title":200,"file_type":137,"home_preview_img_url":201,"slug":202,"view_count":29,"category_name":30,"create_tm":203},698704,"CMSC 420 - Skip Lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010410348/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=Op7L1FCk5B2smlON7SIUMG6t9LY%3D","cmsc-420-skip-lists",1794454926,{"doc_id":205,"doc_title":206,"file_type":137,"home_preview_img_url":207,"slug":208,"view_count":19,"category_name":30,"create_tm":209},685692,"ArrayList vs LinkedList - For Introduction to Java Programming - Performance Comparison","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000179353/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=cCL6FmNLDgjNVYdkRLrN0JPzXSI%3D","arraylist-vs-linkedlist-for-introduction-to-java-programming-performance-comparison",1794016770]