Shadorain
Badges: 5
Rep:
?
#1
Report Thread starter 1 year ago
#1
'Describe why a stack is not a suitable data structure for holding client records at a call centre. Suggest a more suitable data structure and justify why it is suitable.' - Someone please help, I don't understand data structures too well...
1
reply
Strange5050
Badges: 17
Rep:
?
#2
Report 1 year ago
#2
Data structures refer to the way in which data is arranged/stored. There are two main types of data structures, linear, data non linear. Linear data structures are the likes of your arrays and lists, where data is stored in a ‘sequential’ manner, and can be almost visualised being in a ‘line. Think about how you can access data via indexes arr[0] ect.. (although this mostly ties to it’s memory location and where these values are stored.

Code:
// See how elements are ‘in a line’
int[] myArr = new int[] { 1, 2, 3 };
Non linear types are your trees, and your graphs. It’s slightly harder to show here but a quick Google’s search for a graph data structure diagram will show you how data is stored, they tend to focus more on the relationship between data/nodes.

As for the question above, a Stack is a data structure in which follow some First In Last out logic, in other words the first ‘data entries’ if you will, can only be accessed after everything beforehand is removed/taken out. Think of it like a box, as you add things, the items you added first are buried beneath other items, and so in order to get those first items you'd have to unpack the box. Meaning in the context of your questions that a stack wouldn’t be useful as you wouldn’t be able to access the data easily.
Last edited by Strange5050; 1 year ago
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

If you haven't confirmed your firm and insurance choices yet, why is that?

I don't want to decide until I've received all my offers (57)
39.58%
I am waiting until the deadline in case anything in my life changes (24)
16.67%
I am waiting until the deadline in case something in the world changes (ie. pandemic-related) (6)
4.17%
I am waiting until I can see the unis in person (15)
10.42%
I still have more questions before I made my decision (15)
10.42%
No reason, just haven't entered it yet (13)
9.03%
Something else (let us know in the thread!) (14)
9.72%

Watched Threads

View All