[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-697950-105":59,"doc-detail-697950-en":130,"doc-similar-697950":161},{"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","unit06-1-arrays-arrays-in-memory-lecture-notes","unit06-1-Arrays - Arrays in Memory Lecture Notes","","Lecture notes on organizing data in computer memory with a focus on arrays and linked lists. Introduces key memory concepts such as main memory, memory addresses, and how memory content is represented with bits. Explains how indexed array elements map to adjacent memory cells in a byte-addressable system, including offset calculation and the reason array indices start at 0. Concludes with arrays’ advantages and limitations and a brief connection to Python’s array concepts.",{"@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/unit06-1-arrays-arrays-in-memory-lecture-notes/697950/",{"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/unit06-1-arrays-arrays-in-memory-lecture-notes/697950.png","ImageObject",300,407,{"name":92,"@type":93},"cimolpedes","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-30","2026-11-12",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 are the two basic ordered sequence structures discussed in the lecture?","Question",{"text":112,"@type":113},"The lecture discusses arrays and linked lists as two basic structures for ordered sequences.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does a computer locate an array element in memory?",{"text":117,"@type":113},"It takes the start address of the array and adds the index multiplied by the size of each element to compute the target element’s address.",{"name":119,"@type":110,"acceptedAnswer":120},"Why do array indices typically start at 0?",{"text":121,"@type":113},"Because when the index is 0, the computed offset points to the first element at the array’s start address, making the address calculation consistent.","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},697950,1794446318,{"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":129,"read_time":144,"preview_page_count":19,"preview_urls":145},962094243610,"https://ap-avatar.wpscdn.com/davatar_3d24733baf745e90a7e4bdd5f77d97b2","Organizing Data: Arrays, Linked Lists  \nComputer Memory  \nMemory Address (an integer)  \nMain Memory  \nMemory Content (usually 32, 64 bits)  \n2  \nRecall Lists  \n􀂆 Ordered collection of data  \n􀂆 Our mental model is based on indexed data slots  \n0 1 2 3 4 5 6 7 8  \n\n| A | B | C | D | E | F | G | H | I |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- |\n\n􀂆 But how are lists actually stored in computer’s memory?  \nOrganizing Data in Memory  \n􀂆 We are going to see in a few weeks how data types such as integers, strings are represented in computer memory as sequence of bits (0s, 1s) .  \n􀂆 We will work at a higher-level of abstraction and talk about how collections of data are organized in memory.  \n􀂆 For example, how are Python lists organized in memory? How could we organize our data to capture hierarchical relationships between data?  \nData Structure  \n􀂆 The organization of data is a very important issue for computation.  \n􀂆 A data structure is a way of storing data in a computer so that it can be used efficiently.  \n􀂆 Choosing the right data structure will allow us to develop certain algorithms for that data that are more efficient.  \n5  \nToday’s Lecture  \n􀂆 Two basic structures for ordered sequences:  \n􀂆 Arrays and  \n􀂆 Linked lists  \nArrays in Memory  \n􀂆 An array is a very simple data structure for holding a sequence of data. They have a direct correspondence with memory system inmost computers.  \n􀂆 Typically, array elements are stored in adjacent memory cells. The subscript (or index) is used to calculate an offset to find the desired element.  \n| Content |\n| --- |\n| 50 |\n| 42 |\n| 85 |\n| 71 |\n| 99 |\n\nExample: data = [50, 42, 85, 71, 99] Assume we have a byte-addressable computer,  \n* integers are stored using 4 bytes (32 bits)  \n* the first element is stored at address 100 (Nothing special about 100, just an example) .  \nThe array could start at any address.  \n7  \nArrays in Memory  \n􀂆 Example: data = [50, 42, 85, 71, 99]  \nAssume we have a byte-addressable computer, integers are stored using 4 bytes (32 bits) and our array starts at address 100.  \n􀂆 If we want data[3], the computer takes the address of the start of the array (100 in our example)  \nand adds the index * the size of an array element Content (4 bytes in our example) to find the element we  \nwant. 100: 50  \n104: 42  \nLocation of data[3] is 100 + 3*4 = 112  \n108: 85  \n􀂆 Do you see why it makes sense for the first 112: 71 index of an array to be 0?  \n116: 99  \n\n|  |\n| --- |\n|  |\n|  |\n|  |\n|  |\n|  |\n\nArrays: Pros and Cons  \n􀂆 Pros:  \n􀂆 Access to an array element is fast since  \nwe can compute its location quickly (constant time) .  \n􀂆 Cons:  \n􀂆 If we want to insert or delete an element, we have to shift subsequent elements which slows our computation down.  \n􀂆 We need a large enough block of memory to hold our array.  \n9  \nArrays in Python  \n• Array module  \n• Arrays are sequence types and behave very much like lists, except that the type of objects stored in them is constrained.  \n• We only use Python lists in 15110.  \nPython lists are akin to structures called dynamic arrays.  \n10","cbCaiomBtgjYtIdo","https://ap.wps.com/l/cbCaiomBtgjYtIdo","pdf",759232,27,"English","# Organizing Data: Arrays and Linked Lists\n## Computer Memory and Memory Address\n## Organizing Data in Memory\n## Data Structure and Today’s Lecture\n## Arrays in Memory\n## Arrays: Pros and Cons\n## Arrays in Python","[{\"question\":\"What are the two basic ordered sequence structures discussed in the lecture?\",\"answer\":\"The lecture discusses arrays and linked lists as two basic structures for ordered sequences.\"},{\"question\":\"How does a computer locate an array element in memory?\",\"answer\":\"It takes the start address of the array and adds the index multiplied by the size of each element to compute the target element’s address.\"},{\"question\":\"Why do array indices typically start at 0?\",\"answer\":\"Because when the index is 0, the computed offset points to the first element at the array’s start address, making the address calculation consistent.\"}]","unit06-1-Arrays - Arrays in Memory Lecture Notes | PDF",68,[146,150,153,157],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/5c5dc35deb28c9523c26fd4553883352.webp",983,736,{"page_no":14,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/b308bf1a93ebe199ea7cf6c63ae229c6.webp",982,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/bfe6cfc11cdcd417df3695e56af2fe6c.webp",981,735,{"page_no":19,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/d857fd8c683667985a99491ca9d3a280.webp",980,734,{"list":162,"token":66},[163,169,175,181,187,193,199,205,211,217],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":19,"category_name":30,"create_tm":168},685785,"Arrays and Array Lists - Enhanced for Loop and 2D Arrays","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000208921/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109839&Signature=aYHTcdM1vv9S9clEt8Vx63ckA4A%3D","arrays-and-array-lists-enhanced-for-loop-and-2d-arrays",1794018474,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":81,"category_name":30,"create_tm":174},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=1796109839&Signature=aSEMImduln%2BE9KVr3kWxbR3YO3U%3D","linked-lists-chapter-3-overview",1794016986,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":24,"category_name":30,"create_tm":180},685805,"Numpy - Array - Chapter 11 - Informatics Practices","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000213217/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109839&Signature=59xl6zhb3x7armcoh%2FaLoZIHFGc%3D","numpy-array-chapter-11-informatics-practices",1794018711,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":24,"category_name":30,"create_tm":186},685686,"ArrayList in Java","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000179246/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109839&Signature=SDL2ASmnRqArQRLkcJqo8gI6gVo%3D","arraylist-in-java",1794016760,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":19,"category_name":30,"create_tm":192},685664,"General C# Cheat Sheet - Quick reference guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000173279/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109839&Signature=YDxGuW64tKpc0fPu4HJE4KFm1Pc%3D","general-c-cheat-sheet-quick-reference-guide",1794016366,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":19,"category_name":30,"create_tm":198},697965,"Arrays Made Easy - An Introduction to Arrays and Array Processing - SUGI 30 Tutorials","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010146275/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109839&Signature=khwt5hhDMtAs0LWskwdGkYZnG4A%3D","arrays-made-easy-an-introduction-to-arrays-and-array-processing-sugi-30-tutorials",1794446535,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":24,"category_name":30,"create_tm":204},685783,"Programming for GCSE Topic 6.1 - Lists, Arrays, and For Loops","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000208895/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109839&Signature=1aTUSXA2LBzF%2FNECYGZN45%2FvgaM%3D","programming-for-gcse-topic-61-lists-arrays-and-for-loops",1794018470,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":19,"category_name":30,"create_tm":210},685688,"Lecture 11 - Arrays and ArrayLists - Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000179281/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109839&Signature=H4a%2Bck5VwnaBTy6rsm%2FQFCQjhbU%3D","lecture-11-arrays-and-arraylists-introduction",1794016761,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":19,"category_name":30,"create_tm":216},697963,"learn-cpp-dsa-visually-volume-1-sample - Volume 1 - Algorithms inside - introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010142418/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109839&Signature=NK3h2oMYB%2FFYHLS%2BaDiR5RBCgVs%3D","learn-cpp-dsa-visually-volume-1-sample-volume-1-algorithms-inside-introduction",1794446352,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":19,"category_name":30,"create_tm":222},685795,"Tutorial - Arrays and ArrayList - Introduction and Examples","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000212503/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109839&Signature=PGVEJQrLUEsJ3%2FM11nP2DkNTVlk%3D","tutorial-arrays-and-arraylist-introduction-and-examples",1794018675]