[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-685782-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-685782-en":130,"doc-similar-685782":154},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","142-data-structures-advanced-notes-specification","1.4.2 - Data Structures - Advanced Notes - Specification","","Advanced Notes and Specification covering Computer Science A Level topic 1.4.2 on data structures. Explains arrays as ordered finite sets with zero-indexing and includes examples for 1D, 2D, and 3D indexing and visualization. Defines records as rows made of fields, showing database-style structure and access via recordName.fieldName. Describes lists and tuples, including key list operations, immutability of tuples, and example access. Introduces linked lists and their node structure, pointers, and traversal logic, with an example sequence.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/142-data-structures-advanced-notes-specification/685782/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/142-data-structures-advanced-notes-specification/685782.png","ImageObject",300,407,{"name":42,"@type":43},"Rizky","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-15","2026-11-07",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",5,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What does zero-indexed mean for arrays in this specification?","Question",{"text":63,"@type":64},"Arrays are treated as zero-indexed unless stated otherwise, so the first element is at position 0.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How are records structured and accessed?",{"text":68,"@type":64},"A record is made of fields and is used like rows in a database. Fields are accessed using the format recordName.fieldName after the record variable is declared.",{"name":70,"@type":61,"acceptedAnswer":71},"What is a key difference between lists and arrays described here?",{"text":72,"@type":64},"Lists store values non-contiguously and can contain elements of more than one data type, while arrays are stored contiguously and are of a single type.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},685782,1794018468,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":55,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":144,"preview_page_count":26,"preview_urls":145},962085564807,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","OCR Computer Science A Level  \n1.4.2 Data Structures  \nAdvanced Notes  \nSpecification  \n1.4.2 a)  \n● Arrays  \n● Records  \n● Lists  \n● Tuples  \n1.4.2 b)  \n● Linked List  \n● Graphs  \n● Stack  \n● Queue  \n● Tree  \n● Binary Search Tree  \n● Hash Table  \n1.4.2 c)  \n● Traversing data structures  \n● Adding data and removing data from data structures  \nArrays, Records, Lists, and Tuples  \nArrays  \nAn array is an ordered, finite set of elements of a single type. A 1D (one-dimensional) array is a linear array. Unless stated in the question, arrays are always taken to be zero-indexed. This means that the first element in the array is considered to be at position zero. Below is an example of a one-dimensional array:  \n\n| oneDimensionalArray = [1, 23, 12, 14, 16, 29, 12] //creates a\u003Cbr>1D array\u003Cbr>print(oneDimensionalArray[3])\u003Cbr>>> 14 |\n| --- |\n| A two-dimensional array can be visualised as a table or spreadsheet. When searching through a 2D array, you first go down the rows and then across the columns to find a given position. This is the reverse to the method used to find a set of coordinates. Below is an example involving a two-dimensional array. |\n| twoDimensionalArray = [[123, 28, 90, 38, 88, 23, 47],[1, 23, 12, 14, 16, 29, 12]]\u003Cbr>print(twoDimensionalArray)\u003Cbr>>> [[23, 28, 90, 38, 88, 23, 47],\u003Cbr>[ 1, 23, 12, 14, 16, 29, 12]]\u003Cbr>print(twoDimensionalArray[1,3]) // Goes down and then across\u003Cbr>>> 14 |\n| A three-dimensional array can be visualised as a multi-page spreadsheet and can bethought of as multiple 2D arrays. Selecting an element in a 3D array requires the following syntax to be used: threeDimensionalArray[z,y,x], where z is the array number, y is the row number and x is the column number. |\n| threeDimensionalArray = [[[12,8],[9,6,19]],[[241,89,4,1],[19,2]]] print(threeDimensionalArray[0,1,2])\u003Cbr>>> 19 |\n\nRecords  \nA record is more commonly referred to as a row in a file and is made up of fields. Records are used in databases, as shown in the table below:  \n\n| ID | FirstName | Surname |\n| --- | --- | --- |\n| 001 | Antony | Joshua |\n| 002 | Tyson | Fury |\n| 003 | Deonte | Wilder |\n\nAbove is a file containing three records, where each record has three fields. A record is declared in the following manner:  \nfighterDataType = record  \nend  \ninteger string  \nstring record  \nID FirstName Surname  \nEach field in the record can be identified by recordName.fieldName. First, however, the record must be created. When creating a record, a variable must first be declared: fighter : fighterDataType  \nThen its attributes can be accessed, using the following syntax: fighter.FirstName  \nLists  \nA list is a data structure consisting of a number of ordered items where the items can occur more than once. Lists are similar to 1D arrays and elements can be accessed in the same way. The difference is that list values are stored non-contiguously. This means they do not have to be stored next to each other in memory, as data in arrays is stored. Lists can also contain elements of more than one data type , unlike arrays.  \nManipulating lists  \nThere are a range of operations that can be performed involving lists, described in the table below. The following structure is used when manipulating lists:  \nList = [23, 36, 62, 49 , 23, 29, 12] List.function(Parameters)  \n\n| List Operations | Example | Description |\n| --- | --- | --- |\n| isEmpty() | List.isEmpty()>> False | Checks if the list is empty |\n| append(value) | List.append(15)>> | Adds a new value to the end of the list |\n| remove(value) | List.remove(23)>> | Removes the value the first time it appears in the list |\n| search(value) | [List.search](List.search) (38)>> False | Searches for a value in the list. |\n| length() | List.length()>> 7 | Returns the length of the list |\n| index(value) | List.index(23)>> 0 | Returns the position of the item |\n| insert(position, value) | List.insert(4,25)>> | Inserts a value at a given position |\n| pop() | List.pop()\u003Cbr>>>12 | Returns and removes the last value in t","cbCaibhUBYt3OKHX","https://ap.wps.com/l/cbCaibhUBYt3OKHX","pdf",590340,14,"English","# 1.4.2 Data Structures\n## Arrays, Records, Lists, and Tuples\n## Linked List, Graphs, Stacks, Queues, and Trees","[{\"question\":\"What does zero-indexed mean for arrays in this specification?\",\"answer\":\"Arrays are treated as zero-indexed unless stated otherwise, so the first element is at position 0.\"},{\"question\":\"How are records structured and accessed?\",\"answer\":\"A record is made of fields and is used like rows in a database. Fields are accessed using the format recordName.fieldName after the record variable is declared.\"},{\"question\":\"What is a key difference between lists and arrays described here?\",\"answer\":\"Lists store values non-contiguously and can contain elements of more than one data type, while arrays are stored contiguously and are of a single type.\"}]","1.4.2 - Data Structures - Advanced Notes - Specification | PDF",35,[146,150],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/e73dd7aa05d60197d3e23fdc0049d28b.webp",983,1390,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/71f12dbf477ae6a4c958b4c00876e549.webp",982,1388,{"list":155,"token":11},[156,162,168,174,180,186,192,198,204,210],{"doc_id":157,"doc_title":158,"file_type":137,"home_preview_img_url":159,"slug":160,"view_count":33,"category_name":29,"create_tm":161},685780,"Tuple in Python - Lecture 2","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000203975/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=tpz81tw8DAmjuqvzC35DzDextZc%3D","tuple-in-python-lecture-2",1794018232,{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":55,"category_name":29,"create_tm":167},685778,"1-Tuples","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000203953/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=D3wxv0cFXXA2AOvXbuAWe7DbHJg%3D","1-tuples",1794018230,{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":33,"category_name":29,"create_tm":173},697980,"TUPLES AND DICTIONARIES - Introduction to Tuples","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010146829/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=ndtMg7VKuh%2FVZnGgkoFg2qKMT3g%3D","tuples-and-dictionaries-introduction-to-tuples",1794446564,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":101,"category_name":29,"create_tm":179},685629,"Chapter 2: Lists, Arrays and Dictionaries","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999084017/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=kREccyYa27NHolZjZpJfsR4Xbwk%3D","chapter-2-lists-arrays-and-dictionaries",1794016092,{"doc_id":181,"doc_title":182,"file_type":137,"home_preview_img_url":183,"slug":184,"view_count":55,"category_name":29,"create_tm":185},685741,"ROHINI COLLEGE OF ENGINEERING & TECHNOLOGY - Linked list implementation - Singly linked lists - Core algorithms for traversal, counting, searching and insertion","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000186201/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=eUS5qZmrsZeOvQYSscOQa7khHK4%3D","rohini-college-of-engineering-technology-linked-list-implementation-singly-linked-lists-core-algorithms-for-traversal-counting-searching-and-insertion",1794017223,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":30,"category_name":29,"create_tm":191},685777,"Lists and Tuples - Learn to create and use 1D lists, tuples and 2D lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000203949/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=gc%2B2npMvn6v8Fxr%2BQTfzF11871A%3D","lists-and-tuples-learn-to-create-and-use-1d-lists-tuples-and-2d-lists",1794018226,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":55,"category_name":29,"create_tm":197},685716,"Linked Lists - Introduction - Properties, Advantages, Disadvantages, and Types","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999688533/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=evgUSj7gHf4miXp%2FzO9l47PWgYE%3D","linked-lists-introduction-properties-advantages-disadvantages-and-types",1794016969,{"doc_id":199,"doc_title":200,"file_type":137,"home_preview_img_url":201,"slug":202,"view_count":105,"category_name":29,"create_tm":203},697976,"6.0001 Lecture 5 - Tuples, Lists, Aliasing, Mutability, Cloning","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010146768/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=ifyKtNbn2YC4beXkWXMFocXzzyY%3D","60001-lecture-5-tuples-lists-aliasing-mutability-cloning",1794446554,{"doc_id":205,"doc_title":206,"file_type":137,"home_preview_img_url":207,"slug":208,"view_count":30,"category_name":29,"create_tm":209},685787,"Arrays - Java Arrays vs Python Lists - Learn how to declare and use arrays in Java","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000208980/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=CQYsqcyxZyTtcE0CeBr%2FPcMR7yo%3D","arrays-java-arrays-vs-python-lists-learn-how-to-declare-and-use-arrays-in-java",1794018478,{"doc_id":211,"doc_title":212,"file_type":137,"home_preview_img_url":213,"slug":214,"view_count":105,"category_name":29,"create_tm":215},685771,"Compound Data - Lists, Tuples, Dictionaries - Unit IV - Learning Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000203726/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=F7DLudLeL7w0ZXnUPDQvD7bq7Ok%3D","compound-data-lists-tuples-dictionaries-unit-iv-learning-notes",1794018217]