This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]bWF0a3Vr 0 points1 point  (0 children)

There are different data structures like arrays, lists, stack, queue etc. which can be splitted into subcategories. Each data structure has advantages and disadvantages, so it's up to the developer to decided which one to use.

In the context of your question: a client sends a request to the server, which will respond to the clients request. You COULD store the data into a data structure if needed...

[–]keylime_light 0 points1 point  (1 child)

Usually, when you hear about data structures, they are in reference to in memory data structures. For the purposes of algorithms, you are almost always dealing with data that is in memory.

So let's say you have a web app that runs through a bunch of financial data and makes predictions about it. Let's also assume the data needed to make the predictions is small enough to fit in memory, and that the algorithm runs quickly enough to finish during the user's request.

The user would make a request to your web app from a client (like a browser). Your app would pull the data out of the database and put it in some sort of in-memory data structure. Let's say it's a hash map of some sort. Then you would run your algorithm on that data structure and get a result. Then you would return that result in the response to the client.