Back to marketplace

1.4.2 Data Structures

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

1.4.2 A) What is an array And what are the different types of arrays

Back (Answer)

An ordered finite set of elements of a single data type. A 1D array is an linear array always zero indexed A 2D array can be like a table or spreadsheet you go up and down the toes then across the columns to find a given position A 3D array can be a visualised as multiple 2D arrays example : print(array[x,y,z]) where x = the array number , y = row , z= column

#2
Front (Question)

1.4.2 A) What is a record

Back (Answer)

A row in a file, made up of values from fields the variable must be declared

#3
Front (Question)

1.4.2 A) What is a list

Back (Answer)

A data structure consisting of ordered items where items can occur more than once. They can contain multiple data types.

#4
Front (Question)

1.4.2 A) How to access a list

Back (Answer)

Similar to 1D array in his they can be access, however values stored non contagiously meaning they don’t need to be next to eachother In memory

#5
Front (Question)

1.4.2 A) Operations of a list

Back (Answer)

IsEmpty() Append(value) Remove(value) Search(value) Length() Index(value) Insert(pos,value) Pop() Pop(pos)

#6
Front (Question)

1.4.2 A) What is a tuple?

Back (Answer)

An ordered set of values of any types. It’s immutable which means cannot be changed elements can’t be added or removed once it’s created. Attempting to add or remove will cause an error

#7
Front (Question)

1.4.2 B) What is a stack What is a stack used for

Back (Answer)

Last in first out (LIFO) data structure. Used as a undo / reverse action

#8
Front (Question)

1.4.2 B) What are the two types of stacks

Back (Answer)

Static or dynamic If max size required is known in advance use static as it’s easier to implement and make more efficient use of memory.

#9
Front (Question)

1.4.2 B) How are stacks implemented

Back (Answer)

Using a pointer which check top of the stack where next piece of data will be inserted

#10
Front (Question)

1.4.2 B) What are the operation of a stack

Back (Answer)

IsEmpty() Push(value) - adds a new value to end of list need to check list is not full Peek() - returns top value make sure stack isn’t empty Pop() same as peek but removed value Size() IsFull()

#11
Front (Question)

1.4.2 B) What is a queue

Back (Answer)

First in first out (FIFO) data structure

#12
Front (Question)

1.4.2 B) What are queues used for

Back (Answer)

Printers linear queue consisting of an array

#13
Front (Question)

1.4.2 B) How is data added / removed from a queue

Back (Answer)

Items added to the next available Space starting from the front. Items are removed from the front. Used two pointers one at front and one at back.

#14
Front (Question)

1.4.2 B) What makes linear queues ineffective

Back (Answer)

As items are removed address cannot be reused in efficient use of space

#15
Front (Question)

1.4.2 B) How can queues become more efficient

Back (Answer)

Circular queues. When the rear pointer = max size of the array it can be looped around to the front of the array uses space more efficiently but harder to implement Only works if front of queue is empty

#16
Front (Question)

1.4.2 B) Operation for circular queue

Back (Answer)

EnQueue() - Adds new item to end of queue. Incriminating back pointer by one DeQueue() - removes item from front of the queue incrementing front pointer by one IsEmpty () IsFull()

#17
Front (Question)

1.4.2 B) What is a linked list

Back (Answer)

Dynamic data structure uses to hold an ordered Sequence. Don’t have to be in contiguous data location. Each item is a node containing data field along side a link or pointer

#18
Front (Question)

1.4.2 B) How can linked list be demonstrated

Back (Answer)

Table with index data and pointer Data field contains value of actual data Pointer field contains the address of the next item in the list

#19
Front (Question)

1.4.2 B) What other variables do linked list contain

Back (Answer)

The start or the first item in the list and also next free stores the index of the next available pos

#20
Front (Question)

1.4.2 B) How to add a new value to the end of the linked list

Back (Answer)

1) add the new value to end of linked list and update “next free “ pointer 2) pointer field of previous last value is updated to point to the new value 3) the pointer field of the new value is updated

#21
Front (Question)

1.4.2 B) Removing a node from a linked list

Back (Answer)

Update the pointer so previous pointer is not pointing to empty node

#22
Front (Question)

1.4.2 B) Adv of linked list

Back (Answer)

Values can be easily added or removed by editing pointer

#23
Front (Question)

1.4.2 B) Dadv of linked list

Back (Answer)

1) nodes is not truly removed from list but just ignored this is a waste of memory 2) as items stored in sequence cannot be individually access like an array 3) more space then an array as needs to store pointers asw

#24
Front (Question)

1.4.2 B) What is a graph What are the types of graphs What can graphs be used for / their adv

Back (Answer)

A set of vertices connected edges / arcs Directed - can only be traveled in one direction Undirected Weighted - cost attached to each edge Can be used to find the shortest path and are easy way to understand complex data