Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Full Notes - Chapter 10 - Data Types and Structures - CIE Computer Science

Rating
-
Sold
-
Pages
5
Uploaded on
09-07-2026
Written in
2025/2026

Full notes for Chapter 10: Data Types and Structures of the CIE A-Level Computer Science course (9618). Notes are written fully according to the specification and all past paper mark schemes.

Institution
Course

Content preview

​10. Data Types and Structures​

​1a. Linear Queues​

​Arrays:​
​●​ ​Ordered, static set of elements​
​●​ ​When an array is created it will first need to know how many elements there are in the array (i.e.​
​how many different values it can hold) - size is fixed (static data structure)​
​●​ ​Once the array is created, this cannot be adjusted when the program is running, so there could be​
​empty elements in the array, wasting space in the computer’s memory​
​●​ ​Data is stored contiguously in memory (items are next to each other)​
​●​ ​All values in an array must be of the same data type​
​●​ ​The position of each element in an array is identified using the array's index​
​●​ ​The array's first element is the lower bound (LB) - typically 0 or 1 depending on language used​
​●​ ​The array's last element is the upper bound (UB)​
​●​ ​An array can be one-dimensional or multi-dimensional​

​Lists (Python only has lists built-in, not arrays):​
​●​ ​When a list is created, doesn’t need to know how many elements it will have - starts at 0​
​●​ ​Items then added one at a time and the list is free to grow (as much as memory allows)​
​●​ ​The actual values could be stored in various locations in memory and they do not have to be​
​stored next to each other in memory​

​A bubble sort is a very efficient algorithm for sorting an array of data:​
​●​ ​It works by cycling through each item of data, and comparing it with the next item of data​
​●​ ​If the next item is smaller, it swaps the two items around, which eventually by the end of the​
​pass, brings the highest value to the end (like a bubble floating to the top)​
​●​ ​This process then repeats, each time making swaps as it goes along​
​●​ ​Program ends once the it completes a pass where it has to make no swaps, or after​​n-1​​passes​

​oundary ← LENGTH(Array) - 1​
B
REPEAT​

NoSwaps ← TRUE​

FOR i ← 1 TO Boundary​

IF Array[i] > Array[i + 1] THEN​

Temp ← Array[i]​

Array[i] ← Array[i + 1]​

Array[i + 1] ← Temp​

NoSwaps ← FALSE​

ENDIF​

NEXT i​

Boundary ← Boundary - 1​

UNTIL NoSwaps = TRUE​



​Abstract Data Types (ADT):​
​●​ ​An abstract data type (ADT) is a logical description of how we view the data and possible​
​operations e.g. a queue of print jobs, a stack of books, to-do list​
​●​ ​We are concerned only with what the data is representing and not how it is constructed​
​●​ ​We are creating an encapsulation around the data - encapsulation is a type of information hiding​

, ​Queues:​
​●​ ​A queue is a FIRST IN, FIRST OUT (FIFO) data structure​
​○​ ​New values may only be added to the end of a queue,​
​○​ ​Values may only be retrieved from the front of the queue​

​Linear Queue:​
​●​ ​Linear queues have four distinct operations​
​○​ ​Add item to the rear of the queue​
​■​ ​ enQueue(item):​
​■​ ​Check that the queue is not already full​
​■​ ​(If it isn’t) then add 1 to the value of the rear pointer (the rear pointer is the index​
​number of the last item in the queue)​
​■​ ​Then add the new item to the position indicated by the rear pointer​
​○​ ​Remove item from the front of the queue​
​■​ ​ deQueue():​
​■​ ​Check the queue is not already empty​
​■​ ​Return value at the front of the queue and delete (or pop)​
​■​ ​Move remaining items up the queue one by one​
​■​ ​Decrement the rear pointer​
​○​ ​Check if the queue is empty​
​■​ ​ isEmpty():​
​○​ ​Check if the queue is full​
​■​ ​isFull():​
​●​ ​Checking if the queue is full/empty is needed to prevent any errors occuring​
​●​ ​Disadvantage of linear queues: if the queue is very long, deQueue will take a very long time as​
​every item must be moved one space​


​1b. Circular Queues​

​A circular queue overcomes the dequeuing issue of linear queues​

​Circular queues have a front pointer and size attribute​

​ hen an item is dequeued, it does not actually get removed​
W
​Instead, the front pointer is increased by one and the size decreases by 1​
​When a new item is enqueued, it overrides items that have been dequeued,​
​and the size (and rear pointer) are increased by 1​

​ he front pointer and rear pointer wrap around to the beginning when the​
T
​index goes beyond the last element in the data structure.​
​●​ ​The new index can be calculated using (​​current index​​+ 1) MOD​​size​

Written for

Study Level
Examinator
Subject
Unit

Document information

Uploaded on
July 9, 2026
Number of pages
5
Written in
2025/2026
Type
SUMMARY

Subjects

$6.89
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
benjaminskn18

Also available in package deal

Get to know the seller

Seller avatar
benjaminskn18 UCS
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 days
Number of followers
0
Documents
21
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions