DATA STRUCTURES (1 Viewer)

SadCeliac

done hsc yay
Joined
Sep 23, 2021
Messages
3,116
Location
Sydney <3
Gender
Male
HSC
2023
Could someone please explain the differences between these????? I can never get these right (also I forget some of them sometimes). Also please help with an example for each:

- 2D Array (e.g a table)
- Array of Records
- Linked file ??? I think this is a thing idrk
theres definitely ones im forgetting 😭

first of all wtf is a record

anwyays
THANKS <3
 

dav53521

Well-Known Member
Joined
Mar 23, 2022
Messages
345
Gender
Male
HSC
2022
2D array is like a matrix (I find it a bit hard to explain it in a non visual manner).
1693630201882.png
probably not the best example this is a 2D array in C#

Array of Records is an ordinary array but with records for each element.

Linked file data structure doesn't exist from what I can see but a linked list does. A linked list is a a list that uses a bunch of nodes to store each element and each node has two fields one which stores the data and the other stores where in memory is the next node. It is a lot better at storing unknown amounts of data compared to an array list but is a lot slower due to having to individually travel through each prior node before reaching the desired node.

A record is a data structure that as NESA states "grouped list of variables, which may each be of different data types" which allows for storing stuff like a book as you can assign the variables to values of different data types such as the title, data of publishing, version, author etc.
 
Last edited:

SadCeliac

done hsc yay
Joined
Sep 23, 2021
Messages
3,116
Location
Sydney <3
Gender
Male
HSC
2023
2D array is like a matrix (I find it a bit hard to explain it in a non visual manner).

Array of Records is an ordinary array but with records for each element.

Linked file data structure doesn't exist from what I can see but a linked list does. A linked list is a a list that uses a bunch of nodes to store each element and each node has two fields one which stores the data and the other stores where in memory is the next node. It is a lot better at storing unknown amounts of data compared to an array list but is a lot slower due to having to individually travel through each prior node before reaching the desired node.

A record is a data structure that as NESA states "grouped list of variables, which may each be of different data types" which allows for storing stuff like a book as you can assign the variables to values of different data types such as the title, data of publishing, version, author etc.
saviour, tysm

and those are just the three we need to know for hsc?? i feel like im forgetting some
 

dav53521

Well-Known Member
Joined
Mar 23, 2022
Messages
345
Gender
Male
HSC
2022
saviour, tysm

and those are just the three we need to know for hsc?? i feel like im forgetting some
In the SDD course specs, the data structures it covers are single and multi-dimensional arrays, which means 2d, 3d, etc., records and array of records. Although you should probably ensure you know about sequential and relative files
 

dav53521

Well-Known Member
Joined
Mar 23, 2022
Messages
345
Gender
Male
HSC
2022
(what's the difference)?
Sequential files can only be accessed in a sequential manner so you have to start from the first record and then go through each record until you get to the one you want and require a delimiter to indicate the end of the file.

Relative uses a key system so each record has a key that is used to "specify a relative position" within the file with it so the key can be used to jump to the desired record meaning that you don't have to go through each record to find a specific one.

Also for the files you need to know how to create, read and append (for sequential) and update a record in the file (for relative). These do have standard algorithms so look at the course specs to ensure you know how to do them although iirc update a record in the file is the longest algorithm in the course specs so gl.
 

SadCeliac

done hsc yay
Joined
Sep 23, 2021
Messages
3,116
Location
Sydney <3
Gender
Male
HSC
2023
Sequential files can only be accessed in a sequential manner so you have to start from the first record and then go through each record until you get to the one you want and require a delimiter to indicate the end of the file.

Relative uses a key system so each record has a key that is used to "specify a relative position" within the file with it so the key can be used to jump to the desired record meaning that you don't have to go through each record to find a specific one.

Also for the files you need to know how to create, read and append (for sequential) and update a record in the file (for relative). These do have standard algorithms so look at the course specs to ensure you know how to do them although iirc update a record in the file is the longest algorithm in the course specs so gl.
bro im gonna die learning these algs

alrighty thank you dave <3
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top